Package org.apache.james.mime4j.util
Class EmptyByteSequence
java.lang.Object
org.apache.james.mime4j.util.EmptyByteSequence
- All Implemented Interfaces:
ByteSequence
-
Field Summary
FieldsFields inherited from interface org.apache.james.mime4j.util.ByteSequence
EMPTY
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMPTY_BYTES
private static final byte[] EMPTY_BYTES
-
-
Constructor Details
-
EmptyByteSequence
EmptyByteSequence()
-
-
Method Details
-
length
public int length()Description copied from interface:ByteSequence
Returns the length of this byte sequence.- Specified by:
length
in interfaceByteSequence
- Returns:
- the number of
byte
s in this sequence.
-
byteAt
public byte byteAt(int index) Description copied from interface:ByteSequence
Returns thebyte
value at the specified index.- Specified by:
byteAt
in interfaceByteSequence
- Parameters:
index
- the index of thebyte
value to be returned.- Returns:
- the corresponding
byte
value
-
toByteArray
public byte[] toByteArray()Description copied from interface:ByteSequence
Copies the contents of this byte sequence into a newly allocated byte array and returns that array.- Specified by:
toByteArray
in interfaceByteSequence
- Returns:
- a byte array holding a copy of this byte sequence.
-