com.scand.jndi.registry
Class ByteArray
java.lang.Object
com.scand.jndi.registry.ByteArray
- public class ByteArray
- extends java.lang.Object
Class for storing array of bytes. The stored array will never be modified by this class.
It stores not a copy of the array so any modifications of the array after it was passed
to ByteArray will lead to modifications of the stored array.
|
Method Summary |
static java.lang.String |
byteToASCII(byte b)
|
byte[] |
getBytes()
|
void |
setBytes(byte[] array)
|
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ByteArray
public ByteArray()
ByteArray
public ByteArray(byte[] array)
- Parameters:
array - The array of bytes to store.
byteToASCII
public static java.lang.String byteToASCII(byte b)
- Parameters:
b - Byte.
- Returns:
- String representation of the
b.
getBytes
public byte[] getBytes()
- Returns:
- The stored array.
setBytes
public void setBytes(byte[] array)
- Parameters:
array - The array to store.
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Returns a string representation of the object. In general, the
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
- Returns:
- String representation of stored data.