org.joda.primitives
Class ByteUtils

java.lang.Object
  extended by org.joda.primitives.ByteUtils

public class ByteUtils
extends Object

Provides utility methods and constants for byte.

Since:
1.0
Version:
CODE GENERATED
Author:
Stephen Colebourne, Jason Tiscione

Field Summary
static byte[] EMPTY_BYTE_ARRAY
          Immutable empty array.
 
Constructor Summary
ByteUtils()
          Constructor that should not usually be used.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_BYTE_ARRAY

public static final byte[] EMPTY_BYTE_ARRAY
Immutable empty array.

Constructor Detail

ByteUtils

public ByteUtils()
Constructor that should not usually be used.

Method Detail

toObject

public static Byte toObject(byte value)
Wraps an byte with an Object wrapper.

Parameters:
value - the primitive value
Returns:
the Object wrapper

toPrimitive

public static byte toPrimitive(Object value)
Unwraps the Byte to retrieve the primitive byte.

Parameters:
value - the Object wrapper, must not be null
Returns:
the primitive value
Throws:
NullPointerException - if the value if null
ClassCastException - if the object is not Byte

toPrimitiveArray

public static byte[] toPrimitiveArray(Collection<?> coll)
Unwraps a Collection to retrieve the primitive byte.

Parameters:
coll - the Collection of Byte, must not be null
Returns:
the primitive value array
Throws:
NullPointerException - if the collection if null
ClassCastException - if any object is not Byte


Copyright © 2005-2010 Joda.org. All Rights Reserved.