Package org.apache.james.mime4j.util
Class EmptyByteSequence
- java.lang.Object
-
- org.apache.james.mime4j.util.EmptyByteSequence
-
- All Implemented Interfaces:
ByteSequence
final class EmptyByteSequence extends java.lang.Object implements ByteSequence
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]EMPTY_BYTES-
Fields inherited from interface org.apache.james.mime4j.util.ByteSequence
EMPTY
-
-
Constructor Summary
Constructors Constructor Description EmptyByteSequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytebyteAt(int index)Returns thebytevalue at the specified index.intlength()Returns the length of this byte sequence.byte[]toByteArray()Copies the contents of this byte sequence into a newly allocated byte array and returns that array.
-
-
-
Method Detail
-
length
public int length()
Description copied from interface:ByteSequenceReturns the length of this byte sequence.- Specified by:
lengthin interfaceByteSequence- Returns:
- the number of
bytes in this sequence.
-
byteAt
public byte byteAt(int index)
Description copied from interface:ByteSequenceReturns thebytevalue at the specified index.- Specified by:
byteAtin interfaceByteSequence- Parameters:
index- the index of thebytevalue to be returned.- Returns:
- the corresponding
bytevalue
-
toByteArray
public byte[] toByteArray()
Description copied from interface:ByteSequenceCopies the contents of this byte sequence into a newly allocated byte array and returns that array.- Specified by:
toByteArrayin interfaceByteSequence- Returns:
- a byte array holding a copy of this byte sequence.
-
-