diff --git a/src/org/jgroups/util/ByteArrayDataInputStream.java b/src/org/jgroups/util/ByteArrayDataInputStream.java index 58e4cfda4d..990ab2de3f 100644 --- a/src/org/jgroups/util/ByteArrayDataInputStream.java +++ b/src/org/jgroups/util/ByteArrayDataInputStream.java @@ -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();