public class OtpErlangBitstr extends OtpErlangObject implements java.io.Serializable, java.lang.Cloneable
OtpErlangObject.Hash
限定符和类型 | 字段和说明 |
---|---|
protected byte[] |
bin |
protected int |
pad_bits |
hashCodeValue
构造器和说明 |
---|
OtpErlangBitstr(byte[] bin)
Create a bitstr from a byte array
|
OtpErlangBitstr(byte[] bin,
int pad_bits)
Create a bitstr with pad bits from a byte array.
|
OtpErlangBitstr(java.lang.Object o)
Create a bitstr from an arbitrary Java Object.
|
OtpErlangBitstr(OtpInputStream buf)
Create a bitstr from a stream containing a bitstr encoded in Erlang
external format.
|
限定符和类型 | 方法和说明 |
---|---|
byte[] |
binaryValue()
Get the byte array from a bitstr, padded with zero bits in the little end
of the last byte.
|
java.lang.Object |
clone() |
protected int |
doHashCode() |
void |
encode(OtpOutputStream buf)
Convert this bitstr to the equivalent Erlang external representation.
|
boolean |
equals(java.lang.Object o)
Determine if two bitstrs are equal.
|
java.lang.Object |
getObject()
Get the java Object from the bitstr.
|
int |
pad_bits()
Get the number of pad bits in the last byte of the bitstr.
|
int |
size()
Get the size in whole bytes of the bitstr, rest bits in the last byte not
counted.
|
java.lang.String |
toString()
Get the string representation of this bitstr object.
|
decode, hashCode
public OtpErlangBitstr(byte[] bin)
bin
- the array of bytes from which to create the bitstr.public OtpErlangBitstr(byte[] bin, int pad_bits)
bin
- the array of bytes from which to create the bitstr.pad_bits
- the number of unused bits in the low end of the last byte.public OtpErlangBitstr(OtpInputStream buf) throws OtpErlangDecodeException
buf
- the stream containing the encoded bitstr.OtpErlangDecodeException
- if the buffer does not contain a valid external
representation of an Erlang bitstr.public OtpErlangBitstr(java.lang.Object o)
o
- the object to serialize and create this bitstr from.public byte[] binaryValue()
public int size()
public int pad_bits()
public java.lang.Object getObject()
public java.lang.String toString()
toString
在类中 OtpErlangObject
public void encode(OtpOutputStream buf)
encode
在类中 OtpErlangObject
buf
- an output stream to which the encoded bitstr should be
written.public boolean equals(java.lang.Object o)
equals
在类中 OtpErlangObject
o
- the bitstr to compare to.protected int doHashCode()
doHashCode
在类中 OtpErlangObject
public java.lang.Object clone()
clone
在类中 OtpErlangObject