From 0e0ae95b39631918a1a613faacb4a6657f4dcef7 Mon Sep 17 00:00:00 2001 From: Bela Ban Date: Wed, 13 Sep 2023 15:43:03 +0200 Subject: [PATCH] ns --- src/org/jgroups/util/ByteArrayDataInputStream.java | 4 ++++ 1 file changed, 4 insertions(+) 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();