public class OtpErlangBinary extends OtpErlangBitstr
Constructor and Description |
---|
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 containing a binary encoded in Erlang
external format.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
void |
encode(OtpOutputStream buf)
Convert this binary to the equivalent Erlang external representation.
|
binaryValue, 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(java.lang.Object o)
o
- the object to serialize and create this binary from.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 java.lang.Object clone()
clone
in class OtpErlangBitstr
public void encode(OtpOutputStream buf)
encode
in class OtpErlangBitstr
buf
- an output stream to which the encoded binary should be
written.