|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.naming.RefAddr
javax.naming.BinaryRefAddr
public class BinaryRefAddr
RefAddr that uses a byte array as content. This can be used to reference objects that can only be represented as byte arrays.
Reference
,
Serialized FormField Summary |
---|
Fields inherited from class javax.naming.RefAddr |
---|
addrType |
Constructor Summary | |
---|---|
BinaryRefAddr(String addrType,
byte[] buf)
Contructs a new BinaryRefAddr with the given type and content. |
|
BinaryRefAddr(String addrType,
byte[] buf,
int off,
int length)
Contructs a new BinaryRefAddr with the given type and the content taken from the given byte array. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Checks if the object is a BinaryRefAddr with the same type and with the same bytes in the content. |
Object |
getContent()
Returns the byte array contents as given to the constructor. |
int |
hashCode()
Returns the hashCode which is the hasCode of the String returned by getType() plus the hashCode of the byte array returned by
getContent . |
String |
toString()
Returns a String representation of the RefAddr. |
Methods inherited from class javax.naming.RefAddr |
---|
getType |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BinaryRefAddr(String addrType, byte[] buf)
public BinaryRefAddr(String addrType, byte[] buf, int off, int length)
Method Detail |
---|
public Object getContent()
getContent
in class RefAddr
public boolean equals(Object o)
equals
in class RefAddr
o
- the Object to compare to
Object.hashCode()
public int hashCode()
getType()
plus the hashCode of the byte array returned by
getContent
. The hashCode of the byte array is calculated
by taking the xor of all the bytes in the array, or zero when there are
no bytes in the array.
hashCode
in class RefAddr
Object.equals(Object)
,
System.identityHashCode(Object)
public String toString()
toString
in class RefAddr
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |