Skip to content

Commit

Permalink
ns
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Sep 13, 2023
1 parent 8976814 commit 0e0ae95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/jgroups/util/ByteArrayDataInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public ByteArrayDataInputStream(byte[] buf, int offset, int length) {
this.pos=checkBounds(offset);
}

public ByteArrayDataInputStream(ByteArray buf) {
this(buf.getArray(), buf.getOffset(), buf.getLength());
}

public ByteArrayDataInputStream(ByteBuffer buffer) {
int offset=buffer.hasArray()? buffer.arrayOffset() + buffer.position() : buffer.position(),
len=buffer.remaining();
Expand Down

0 comments on commit 0e0ae95

Please sign in to comment.