|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ericsson.otp.erlang.OtpErlangObject | +--com.ericsson.otp.erlang.OtpErlangBinary
Provides a Java representation of Erlang binaries. Anything that can be represented as a sequence of bytes can be made into an Erlang binary.
Constructor Summary | |
OtpErlangBinary(byte[] bin)
Create a binary from a byte array |
|
OtpErlangBinary(java.lang.Object o)
Create a binary from an arbitrary Java Object. |
|
OtpErlangBinary(OtpInputStream buf)
Create a binary from a stream containinf a binary encoded in Erlang external format. |
Method Summary | |
byte[] |
binaryValue()
Get the byte array from a binary. |
java.lang.Object |
clone()
|
void |
encode(OtpOutputStream buf)
Convert this binary to the equivalent Erlang external representation. |
boolean |
equals(java.lang.Object o)
Determine if two binaries are equal. |
java.lang.Object |
getObject()
Get the java Object from the binary. |
int |
size()
Get the size of the binary. |
java.lang.String |
toString()
Get the string representation of this binary object. |
Methods inherited from class com.ericsson.otp.erlang.OtpErlangObject |
decode |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OtpErlangBinary(byte[] bin)
bin
- the array of bytes from which to create the binary.public OtpErlangBinary(OtpInputStream buf) throws OtpErlangDecodeException
buf
- the stream containing the encoded binary.OtpErlangDecodeException
- if the buffer does not
contain a valid external representation of an Erlang binary.public OtpErlangBinary(java.lang.Object o)
o
- the object to serialize and create this binary from.Method Detail |
public byte[] binaryValue()
public int size()
public java.lang.Object getObject()
public java.lang.String toString()
toString
in class OtpErlangObject
public void encode(OtpOutputStream buf)
encode
in class OtpErlangObject
buf
- an output stream to which the encoded binary should be
written.public boolean equals(java.lang.Object o)
equals
in class OtpErlangObject
o
- the binary to compare to.public java.lang.Object clone()
clone
in class OtpErlangObject
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |