net.sf.rej.util
Class ByteSerializer

java.lang.Object
  extended by net.sf.rej.util.ByteSerializer

public class ByteSerializer
extends java.lang.Object

A class that wraps a byte array for stream-type writing.

Author:
Sami Koivu

Constructor Summary
ByteSerializer(boolean bigEndian)
           
 
Method Summary
 void addByte(int b)
           
 void addBytes(byte[] data)
           
 void addBytes(byte[] data, int length)
           
 void addBytes(byte[] data, int offset, int length)
           
 void addInt(long l)
           
 void addShort(int i)
           
 byte[] getBytes()
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteSerializer

public ByteSerializer(boolean bigEndian)
Method Detail

getBytes

public byte[] getBytes()

addBytes

public void addBytes(byte[] data)

addBytes

public void addBytes(byte[] data,
                     int length)

addBytes

public void addBytes(byte[] data,
                     int offset,
                     int length)

addByte

public void addByte(int b)

addShort

public void addShort(int i)

addInt

public void addInt(long l)

size

public int size()