Class ByteArrayByteSequence
java.lang.Object
net.officefloor.server.stream.impl.ByteArrayByteSequence
- All Implemented Interfaces:
Serializable,ByteSequence
byte array ByteSequence.- Author:
- Daniel Sagenschneider
- See Also:
-
Field Summary
Fields inherited from interface net.officefloor.server.stream.impl.ByteSequence
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbytebyteAt(int index) Obtains thebyteat the index.intlength()Obtains the number ofbytevalues in theByteSequence.
-
Constructor Details
-
ByteArrayByteSequence
public ByteArrayByteSequence(byte[] bytes) Instantiate.- Parameters:
bytes- Bytes backing thisByteSequence.
-
-
Method Details
-
byteAt
public byte byteAt(int index) Description copied from interface:ByteSequenceObtains thebyteat the index.- Specified by:
byteAtin interfaceByteSequence- Parameters:
index- Index of thebyte.- Returns:
byteat the index.
-
length
public int length()Description copied from interface:ByteSequenceObtains the number ofbytevalues in theByteSequence.- Specified by:
lengthin interfaceByteSequence- Returns:
- Number of
bytevalues in theByteSequence.
-