Package com.ericsson.otp.erlang
Class OtpErlangBinary
- java.lang.Object
- 
- com.ericsson.otp.erlang.OtpErlangObject
- 
- com.ericsson.otp.erlang.OtpErlangBitstr
- 
- com.ericsson.otp.erlang.OtpErlangBinary
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable
 
 public class OtpErlangBinary extends OtpErlangBitstr Provides a Java representation of Erlang binaries. Anything that can be represented as a sequence of bytes can be made into an Erlang binary.- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.ericsson.otp.erlang.OtpErlangObjectOtpErlangObject.Hash
 
- 
 - 
Field Summary- 
Fields inherited from class com.ericsson.otp.erlang.OtpErlangBitstrbin, pad_bits
 - 
Fields inherited from class com.ericsson.otp.erlang.OtpErlangObjecthashCodeValue
 
- 
 - 
Constructor SummaryConstructors Constructor Description OtpErlangBinary(byte[] bin)Create a binary from a byte arrayOtpErlangBinary(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.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()voidencode(OtpOutputStream buf)Convert this binary to the equivalent Erlang external representation.- 
Methods inherited from class com.ericsson.otp.erlang.OtpErlangBitstrbinaryValue, doHashCode, equals, getObject, pad_bits, size, toString
 - 
Methods inherited from class com.ericsson.otp.erlang.OtpErlangObjectbind, decode, hashCode, match
 
- 
 
- 
- 
- 
Constructor Detail- 
OtpErlangBinarypublic OtpErlangBinary(byte[] bin) Create a binary from a byte array- Parameters:
- bin- the array of bytes from which to create the binary.
 
 - 
OtpErlangBinarypublic OtpErlangBinary(OtpInputStream buf) throws OtpErlangDecodeException Create a binary from a stream containing a binary encoded in Erlang external format.- Parameters:
- buf- the stream containing the encoded binary.
- Throws:
- OtpErlangDecodeException- if the buffer does not contain a valid external representation of an Erlang binary.
 
 - 
OtpErlangBinarypublic OtpErlangBinary(java.lang.Object o) Create a binary from an arbitrary Java Object. The object must implement java.io.Serializable or java.io.Externalizable.- Parameters:
- o- the object to serialize and create this binary from.
 
 
- 
 - 
Method Detail- 
encodepublic void encode(OtpOutputStream buf) Convert this binary to the equivalent Erlang external representation.- Overrides:
- encodein class- OtpErlangBitstr
- Parameters:
- buf- an output stream to which the encoded binary should be written.
 
 - 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- OtpErlangBitstr
 
 
- 
 
-