com.novell.admin.ns.nds
Class OctetListFacade

java.lang.Object
  extended bycom.novell.admin.ns.ValueListFacade
      extended bycom.novell.admin.ns.nds.OctetListFacade

public final class OctetListFacade
extends ValueListFacade

Facade for the NDS Octet list syntax.


Field Summary
 
Fields inherited from class com.novell.admin.ns.ValueListFacade
valueList
 
Constructor Summary
OctetListFacade(ValueList comp)
          Constructs an OctetListFacade object.
 
Method Summary
 void addOctet(byte[] octet)
          Adds an octet to the list.
static ValueList createValueList(byte[][] octets)
          Creates an NDS octet list ValueList.
static ValueList createValueList(byte[][] octets, Syntax syn)
          Creates an octet list ValueList.
 byte[] getOctet(int index)
          Retrieves an octet in the list.
 byte[][] getOctets()
          Retrieves the octet list.
 void removeOctet(int index)
          Removes an octet from the list.
 void replaceOctet(byte[] octet, int index)
          Replace an octet in the list.
 void setOctet(byte[] newOctet, int index)
          Sets an octet in the list.
 
Methods inherited from class com.novell.admin.ns.ValueListFacade
getValueList, replaceBooleanValue, replaceHexValue, replaceLongValue, replaceStringValue, replaceValueList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OctetListFacade

public OctetListFacade(ValueList comp)
                throws IncompatibleComponentException
Constructs an OctetListFacade object.

Parameters:
comp - The ValueList that represents the Octet list data.
Throws:
IncompatibleComponentException - Not used.
Method Detail

addOctet

public void addOctet(byte[] octet)
Adds an octet to the list.

Parameters:
octet - The octet to add.

createValueList

public static ValueList createValueList(byte[][] octets)
Creates an NDS octet list ValueList. This form is provided for backward compatibility and assumes NDS syntax.

Parameters:
octets - Refer to NDS Schema Reference.
Returns:
A new octet list ValueList.

createValueList

public static ValueList createValueList(byte[][] octets,
                                        Syntax syn)
Creates an octet list ValueList.

Parameters:
octets - Refer to NDS Schema Reference.
syn - The syntax to use, either NDSSyntax.SYN_OCTET_LIST or LDAPSyntax.SYN_OCTET_LIST.
Returns:
A new octet list ValueList.

getOctet

public byte[] getOctet(int index)
                throws java.lang.ArrayIndexOutOfBoundsException
Retrieves an octet in the list.

Parameters:
index - The index of the octet to retrieve.
Returns:
The octet.
Throws:
java.lang.ArrayIndexOutOfBoundsException - index in not in range of list.

getOctets

public byte[][] getOctets()
Retrieves the octet list.

Returns:
The octet list as an array of byte[].

removeOctet

public void removeOctet(int index)
                 throws java.lang.ArrayIndexOutOfBoundsException
Removes an octet from the list.

Parameters:
index - The index of the octet to remove.
Throws:
java.lang.ArrayIndexOutOfBoundsException - index in not in range of list.

replaceOctet

public void replaceOctet(byte[] octet,
                         int index)
                  throws java.lang.ArrayIndexOutOfBoundsException
Replace an octet in the list.

Parameters:
octet - The new octet.
index - The index of the octet to be replaced.
Throws:
java.lang.ArrayIndexOutOfBoundsException - index in not in range of list.

setOctet

public void setOctet(byte[] newOctet,
                     int index)
              throws java.lang.ArrayIndexOutOfBoundsException
Sets an octet in the list.

Parameters:
newOctet - The octet to set.
index - The index of the octet to set.
Throws:
java.lang.ArrayIndexOutOfBoundsException - index in not in range of list.


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.