Opaque Bytes Sub Sequence
Class is public for serialization purposes.
Properties
The underlying bytes. Some implementations may choose to make a copy of the underlying ByteArray for security reasons. For example, OpaqueBytes.
Functions
Compare byte arrays byte by byte. Arrays that are shorter are deemed less than longer arrays if all the bytes of the shorter array equal those in the same position of the longer array.
Copy this sequence, complete with new backing array. This can be helpful to break references to potentially large backing arrays from small sub-sequences.
Convenience extension method for deserializing a ByteSequence, utilising the defaults.
Additionally returns SerializationContext which was used for encoding. It might be helpful to know SerializationContext to use the same encoding in the reply.
Returns a ByteArrayInputStream of the bytes.
Write this sequence to a ByteBuffer.
A new read-only ByteBuffer view of this sequence or part of it. If start or end are negative then IllegalArgumentException is thrown, otherwise they are clamped if necessary. This method cannot be used to get bytes before offset or after offset+size, and never makes a new array.
Create a sub-sequence of this sequence. A copy of the underlying array may be made, if a subclass overrides bytes to do so, as OpaqueBytes does.
Take the first n bytes of this sequence as a sub-sequence. See subSequence for further semantics.
Write this sequence to an OutputStream.