dbXML API

com.dbxml.util
Class ByteArray

java.lang.Object
  extended bycom.dbxml.util.ByteArray

public final class ByteArray
extends java.lang.Object

ByteArray manages fixed-length byte arrays


Constructor Summary
ByteArray(byte[] data)
           
ByteArray(byte[] data, int offset, int length)
           
ByteArray(int size)
           
 
Method Summary
 byte[] getData()
           
 int getLength()
           
 int getOffset()
           
 int getPos()
           
 byte readByte()
           
static byte readByte(byte[] data, int offset)
           
 ByteArray readBytes(byte[] buffer)
           
static void readBytes(byte[] data, int offset, byte[] buffer)
           
static void readBytes(byte[] data, int offset, byte[] buffer, int pos, int length)
           
 ByteArray readBytes(byte[] buffer, int offset, int length)
           
 char readChar()
           
static char readChar(byte[] data, int offset)
           
 int readInt()
           
static int readInt(byte[] data, int offset)
           
 long readLong()
           
static long readLong(byte[] data, int offset)
           
 short readShort()
           
static short readShort(byte[] data, int offset)
           
 void resetPos()
           
 void setPos(int pos)
           
 ByteArray writeByte(byte value)
           
static void writeByte(byte[] data, int offset, byte value)
           
 ByteArray writeBytes(byte[] buffer)
           
static void writeBytes(byte[] data, int offset, byte[] buffer)
           
static void writeBytes(byte[] data, int offset, byte[] buffer, int pos, int length)
           
 ByteArray writeBytes(byte[] buffer, int offset, int length)
           
static void writeChar(byte[] data, int offset, char value)
           
 ByteArray writeChar(char value)
           
static void writeInt(byte[] data, int offset, int value)
           
 ByteArray writeInt(int value)
           
static void writeLong(byte[] data, int offset, long value)
           
 ByteArray writeLong(long value)
           
static void writeShort(byte[] data, int offset, short value)
           
 ByteArray writeShort(short value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArray

public ByteArray(int size)

ByteArray

public ByteArray(byte[] data,
                 int offset,
                 int length)

ByteArray

public ByteArray(byte[] data)
Method Detail

getData

public byte[] getData()

getLength

public int getLength()

getOffset

public int getOffset()

getPos

public int getPos()

setPos

public void setPos(int pos)

resetPos

public void resetPos()

readLong

public static long readLong(byte[] data,
                            int offset)

readLong

public long readLong()

readInt

public static int readInt(byte[] data,
                          int offset)

readInt

public int readInt()

readShort

public static short readShort(byte[] data,
                              int offset)

readShort

public short readShort()

readChar

public static char readChar(byte[] data,
                            int offset)

readChar

public char readChar()

readByte

public static byte readByte(byte[] data,
                            int offset)

readByte

public byte readByte()

readBytes

public static void readBytes(byte[] data,
                             int offset,
                             byte[] buffer,
                             int pos,
                             int length)

readBytes

public ByteArray readBytes(byte[] buffer,
                           int offset,
                           int length)

readBytes

public static void readBytes(byte[] data,
                             int offset,
                             byte[] buffer)

readBytes

public ByteArray readBytes(byte[] buffer)

writeLong

public static void writeLong(byte[] data,
                             int offset,
                             long value)

writeLong

public ByteArray writeLong(long value)

writeInt

public static void writeInt(byte[] data,
                            int offset,
                            int value)

writeInt

public ByteArray writeInt(int value)

writeShort

public static void writeShort(byte[] data,
                              int offset,
                              short value)

writeShort

public ByteArray writeShort(short value)

writeChar

public static void writeChar(byte[] data,
                             int offset,
                             char value)

writeChar

public ByteArray writeChar(char value)

writeByte

public static void writeByte(byte[] data,
                             int offset,
                             byte value)

writeByte

public ByteArray writeByte(byte value)

writeBytes

public static void writeBytes(byte[] data,
                              int offset,
                              byte[] buffer,
                              int pos,
                              int length)

writeBytes

public ByteArray writeBytes(byte[] buffer,
                            int offset,
                            int length)

writeBytes

public static void writeBytes(byte[] data,
                              int offset,
                              byte[] buffer)

writeBytes

public ByteArray writeBytes(byte[] buffer)

dbXML API

Copyright (c) 2004 The dbXML Group