com.tivoli.twg.engine.slp
Class Opaque

java.lang.Object
  extended bycom.tivoli.twg.engine.slp.Opaque

public final class Opaque
extends java.lang.Object

SLPv2 Opaque attribute

from RFC 2608 (Service Location Protocol, Version 2):

Opaque values are sequences of bytes. These are distinguished from Strings since they begin with the sequence "\FF". This, unescaped, is an illegal UTF-8 encoding, indicating that what follows is a sequence of bytes expressed in escape notation which constitute the binary value. For example, a '0' byte is encoded "\FF\00".


Constructor Summary
Opaque(byte[] byteArray)
          Constructs a newly allocated Opaque object
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for the object.
 byte[] toByteArray()
          Returns byte array represention of this object
 java.lang.String toString()
          Returns a string representation of the object.
static Opaque valueOf(java.lang.String string)
          Returns a new Opaque object initialized to the value of the specified string.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Opaque

public Opaque(byte[] byteArray)
Constructs a newly allocated Opaque object

Throws:
java.lang.NullPointerException - if byteArray is null
Method Detail

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.

See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Returns a hash code value for the object.

See Also:
Object.hashCode()

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()

toString

public java.lang.String toString()
Returns a string representation of the object.

See Also:
Object.toString()

valueOf

public static Opaque valueOf(java.lang.String string)
                      throws OpaqueFormatException
Returns a new Opaque object initialized to the value of the specified string.

Parameters:
string - string to be parsed
Returns:
Opaque opaque object
Throws:
java.lang.NullPointerException - if string is null
OpaqueFormatException - if string is not a valid opaque string

toByteArray

public byte[] toByteArray()
Returns byte array represention of this object

Returns:
byte[] value of this opaque object, as a byte array