Class ByteString.BoundedByteString

All Implemented Interfaces:
Serializable, Iterable<Byte>
Enclosing class:
ByteString

private static final class ByteString.BoundedByteString extends ByteString.LiteralByteString
This class is used to represent the substring of a ByteString over a single byte array. In terms of the public API of ByteString, you end up here by calling ByteString.copyFrom(byte[]) followed by ByteString.substring(int, int).

This class contains most of the overhead involved in creating a substring from a ByteString.LiteralByteString. The overhead involves some range-checking and two extra fields.