sisc.ser
Class BerEncoding

java.lang.Object
  extended by sisc.ser.BerEncoding
Direct Known Subclasses:
DeserializerImpl, LibraryBuilder, SerializerImpl

public abstract class BerEncoding
extends java.lang.Object

Class for efficient integer representation. A BER encoded integer is represented as a variable length sequence of bytes, in network-byte order, with 7 bits of data, and the topmost bit representing a "continue" flag. If set, another byte follows. This allows numbers in the range 0-127 to be represented with one byte, 128-16384 in two bytes, etc.


Constructor Summary
BerEncoding()
           
 
Method Summary
static int readBer(java.io.DataInput dis)
           
static long readBerLong(java.io.DataInput in)
           
static short readBerShort(java.io.DataInput dis)
           
static void writeBer(long v, java.io.DataOutput dos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BerEncoding

public BerEncoding()
Method Detail

writeBer

public static void writeBer(long v,
                            java.io.DataOutput dos)
                     throws java.io.IOException
Throws:
java.io.IOException

readBerLong

public static long readBerLong(java.io.DataInput in)
                        throws java.io.IOException
Throws:
java.io.IOException

readBerShort

public static short readBerShort(java.io.DataInput dis)
                          throws java.io.IOException
Throws:
java.io.IOException

readBer

public static int readBer(java.io.DataInput dis)
                   throws java.io.IOException
Throws:
java.io.IOException