com.ericsson.otp.erlang
Class OtpErlangUShort

java.lang.Object
  extended by com.ericsson.otp.erlang.OtpErlangObject
      extended by com.ericsson.otp.erlang.OtpErlangLong
          extended by com.ericsson.otp.erlang.OtpErlangUShort
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class OtpErlangUShort
extends OtpErlangLong
implements java.io.Serializable, java.lang.Cloneable

Provides a Java representation of Erlang integral types.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ericsson.otp.erlang.OtpErlangObject
OtpErlangObject.Hash
 
Field Summary
 
Fields inherited from class com.ericsson.otp.erlang.OtpErlangObject
hashCodeValue
 
Constructor Summary
OtpErlangUShort(OtpInputStream buf)
          Create an Erlang integer from a stream containing an integer encoded in Erlang external format.
OtpErlangUShort(short s)
          Create an Erlang integer from the given value.
 
Method Summary
 
Methods inherited from class com.ericsson.otp.erlang.OtpErlangLong
bigIntegerValue, bitLength, byteValue, charValue, doHashCode, encode, equals, intValue, isLong, isULong, longValue, shortValue, signum, toString, uIntValue, uShortValue
 
Methods inherited from class com.ericsson.otp.erlang.OtpErlangObject
clone, decode, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OtpErlangUShort

public OtpErlangUShort(short s)
                throws OtpErlangRangeException
Create an Erlang integer from the given value.

Parameters:
s - the non-negative short value to use.
Throws:
OtpErlangRangeException - if the value is negative.

OtpErlangUShort

public OtpErlangUShort(OtpInputStream buf)
                throws OtpErlangRangeException,
                       OtpErlangDecodeException
Create an Erlang integer from a stream containing an integer encoded in Erlang external format.

Parameters:
buf - the stream containing the encoded value.
Throws:
OtpErlangDecodeException - if the buffer does not contain a valid external representation of an Erlang integer.
OtpErlangRangeException - if the value is too large to be represented as a short, or the value is negative.