Class ByteArrayByteSequence

java.lang.Object
net.officefloor.server.stream.impl.ByteArrayByteSequence
All Implemented Interfaces:
Serializable, ByteSequence

public class ByteArrayByteSequence extends Object implements ByteSequence, Serializable
byte array ByteSequence.
Author:
Daniel Sagenschneider
See Also:
  • Constructor Details

    • ByteArrayByteSequence

      public ByteArrayByteSequence(byte[] bytes)
      Instantiate.
      Parameters:
      bytes - Bytes backing this ByteSequence.
  • Method Details

    • byteAt

      public byte byteAt(int index)
      Description copied from interface: ByteSequence
      Obtains the byte at the index.
      Specified by:
      byteAt in interface ByteSequence
      Parameters:
      index - Index of the byte.
      Returns:
      byte at the index.
    • length

      public int length()
      Description copied from interface: ByteSequence
      Obtains the number of byte values in the ByteSequence.
      Specified by:
      length in interface ByteSequence
      Returns:
      Number of byte values in the ByteSequence.