Package org.apache.activemq.util
Class ByteSequence
java.lang.Object
org.apache.activemq.util.ByteSequence
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompact()byte[]getData()intintfinal intindexOf(byte value, int pos) intindexOf(ByteSequence needle, int pos) intvoidreset()voidsetData(byte[] data) voidsetLength(int length) voidsetOffset(int offset) booleanstartsWith(byte[] bytes) byte[]toArray()Makes a deep copy of the data into a new byte array starting at the offset.
-
Field Details
-
data
public byte[] data -
offset
public int offset -
length
public int length
-
-
Constructor Details
-
ByteSequence
public ByteSequence() -
ByteSequence
public ByteSequence(byte[] data) -
ByteSequence
public ByteSequence(byte[] data, int offset, int length)
-
-
Method Details
-
getData
public byte[] getData() -
getLength
public int getLength() -
getOffset
public int getOffset() -
remaining
public int remaining() -
setData
public void setData(byte[] data) -
setLength
public void setLength(int length) -
setOffset
public void setOffset(int offset) -
compact
public void compact() -
reset
public void reset() -
indexOf
-
indexOf
public final int indexOf(byte value, int pos) -
startsWith
public boolean startsWith(byte[] bytes) -
toArray
public byte[] toArray()Makes a deep copy of the data into a new byte array starting at the offset.- Returns:
-