1 package org.jgroups.util; 2 3 import java.io.ByteArrayInputStream ; 4 5 9 public class ExposedByteArrayInputStream extends ByteArrayInputStream { 10 11 12 24 public ExposedByteArrayInputStream(byte[] buf) { 25 super(buf); 26 } 27 28 42 public ExposedByteArrayInputStream(byte[] buf, int offset, int length) { 43 super(buf, offset, length); 44 } 45 46 public void setData(byte[] buf, int offset, int length) { 47 this.buf = buf; 48 this.pos = offset; 49 this.count = Math.min(offset + length, buf.length); 50 this.mark = offset; 51 } 52 53 54 } 55 | Popular Tags |