Modifier and Type | Field and Description |
---|---|
static byte[] |
EMPTY_BYTE_ARRAY
Immutable empty array.
|
Constructor and Description |
---|
ByteUtils()
Constructor that should not usually be used.
|
Modifier and Type | Method and Description |
---|---|
static Byte |
toObject(byte value)
Wraps an
byte with an Object wrapper. |
static byte |
toPrimitive(Object value)
Unwraps the
Byte to retrieve the primitive byte . |
static byte[] |
toPrimitiveArray(Collection<?> coll)
Unwraps a
Collection to retrieve the primitive byte . |
public static final byte[] EMPTY_BYTE_ARRAY
public ByteUtils()
public static Byte toObject(byte value)
byte
with an Object wrapper.value
- the primitive valuepublic static byte toPrimitive(Object value)
Byte
to retrieve the primitive byte
.value
- the Object wrapper, must not be nullNullPointerException
- if the value if nullClassCastException
- if the object is not Byte
public static byte[] toPrimitiveArray(Collection<?> coll)
Collection
to retrieve the primitive byte
.coll
- the Collection of Byte, must not be nullNullPointerException
- if the collection if nullClassCastException
- if any object is not Byte
Copyright © 2005-2012 Joda.org. All Rights Reserved.