public class ByteUtils
extends java.lang.Object
byte
.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 java.lang.Byte |
toObject(byte value)
Wraps an
byte with an Object wrapper. |
static byte |
toPrimitive(java.lang.Object value)
Unwraps the
Byte to retrieve the primitive byte . |
static byte[] |
toPrimitiveArray(java.util.Collection<?> coll)
Unwraps a
Collection to retrieve the primitive byte . |
public static java.lang.Byte toObject(byte value)
byte
with an Object wrapper.value
- the primitive valuepublic static byte toPrimitive(java.lang.Object value)
Byte
to retrieve the primitive byte
.value
- the Object wrapper, must not be nulljava.lang.NullPointerException
- if the value if nulljava.lang.ClassCastException
- if the object is not Byte
public static byte[] toPrimitiveArray(java.util.Collection<?> coll)
Collection
to retrieve the primitive byte
.coll
- the Collection of Byte, must not be nulljava.lang.NullPointerException
- if the collection if nulljava.lang.ClassCastException
- if any object is not Byte
Copyright © 2005–2018 Joda.org. All rights reserved.