java.io.Serializable
, java.lang.Cloneable
public class OtpErlangBinary extends OtpErlangBitstr
OtpErlangObject.Hash
bin, pad_bits
hashCodeValue
Constructor | Description |
---|---|
OtpErlangBinary(byte[] bin) |
Create a binary from a byte array
|
OtpErlangBinary(OtpInputStream buf) |
Create a binary from a stream containing a binary encoded in Erlang
external format.
|
OtpErlangBinary(java.lang.Object o) |
Create a binary from an arbitrary Java Object.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
clone() |
|
void |
encode(OtpOutputStream buf) |
Convert this binary to the equivalent Erlang external representation.
|
finalize, getClass, notify, notifyAll, wait, wait, wait
binaryValue, doHashCode, equals, getObject, pad_bits, size, toString
bind, decode, hashCode, match
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.public void encode(OtpOutputStream buf)
encode
in class OtpErlangBitstr
buf
- an output stream to which the encoded binary should be
written.public java.lang.Object clone()
clone
in class OtpErlangBitstr