com.novell.admin.ns
Class HexValue

java.lang.Object
  extended bycom.novell.admin.ns.ValueComponent
      extended bycom.novell.admin.ns.Value
          extended bycom.novell.admin.ns.HexValue
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class HexValue
extends Value

Storage class for all syntaxes that use byte[] types.

This is an immutable class.

See Also:
BooleanValue, StringValue, LongValue, StreamValue, Serialized Form

Constructor Summary
HexValue(Syntax syntax, byte[] byteArray)
          Constructor that uses a byte array.
 
Method Summary
 java.lang.Object clone()
          Creates an exact duplicate of this object.
 int getLength()
          Returns the length of the byte[] that currently comprises the hex value.
 byte[] getValue()
          Returns the value as a byte array.
 
Methods inherited from class com.novell.admin.ns.ValueComponent
compareTo, equals, getSyntax, isWithinBounds, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HexValue

public HexValue(Syntax syntax,
                byte[] byteArray)
Constructor that uses a byte array.

This should only be called by a syntax strategy for data types that use byte arrays to store their data.

Parameters:
syntax - Associated syntax.
byteArray - A byte array.
Method Detail

clone

public java.lang.Object clone()
Creates an exact duplicate of this object.

Overrides:
clone in class Value
Returns:
A new HexValue as an Object.

getLength

public int getLength()
Returns the length of the byte[] that currently comprises the hex value.

Returns:
The length of the hex value.

getValue

public byte[] getValue()
Returns the value as a byte array.

The byte array returned is copied from the internal byte array thus keeping this value immutable.

Returns:
The value as a byte array.


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.