Bees v0.5.0 API

bees.core
Class XdrByteArray

java.lang.Object
  |
  +--bees.core.ByteArray
        |
        +--bees.core.XdrByteArray
Direct Known Subclasses:
CipheredXdrByteArray, SignedXdrByteArray

public class XdrByteArray
extends ByteArray

A ByteArray subclass that supports xdr based encoding.


Field Summary
 int index
          The current index into the byte array.
 
Fields inherited from class bees.core.ByteArray
buf, len, offset
 
Constructor Summary
XdrByteArray(byte[] buf)
          Construct an XdrByteArray that wraps the given buffer.
XdrByteArray(byte[] buf, int offset)
          Construct an XdrByteArray that wraps the given buffer.
XdrByteArray(byte[] buf, int offset, int len)
          Construct an XdrByteArray that wraps the given buffer.
XdrByteArray(int len)
          Construct an XdrByteArray that can hold the given number of bytes.
 
Method Summary
 boolean BOOLEAN()
           
 byte BYTE()
           
 ByteArray BYTEARRAY()
           
 void BYTES(byte[] x, int start, int length)
           
 byte[] BYTES(int length)
           
 double DOUBLE()
           
 float FLOAT()
           
 int INT()
           
 int LEINT()
           
 long LELONG()
           
 short LESHORT()
           
 long LONG()
           
 void PUT(boolean x)
           
 void PUT(byte x)
           
 void PUT(byte[] x)
           
 void PUT(byte[] x, int start, int length)
           
 void PUT(ByteArray x)
           
 void PUT(double x)
           
 void PUT(float x)
           
 void PUT(int x)
           
 void PUT(long x)
           
 void PUT(short x)
           
 void PUT(java.lang.String x)
           
 void PUTLE(int x)
           
 void PUTLE(long x)
           
 void PUTLE(short x)
           
 short SHORT()
           
 void SKIP(int offset)
           
 java.lang.String STRING()
           
 java.lang.String toString()
           
 
Methods inherited from class bees.core.ByteArray
concat, concat, fromFile, getByte, getBytes, length, setByte, setBytes, setBytes, toBytes, toFile, toPlainString, toPlainString, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public int index
The current index into the byte array. This is incremented whenever data is written to or read from the array.
Constructor Detail

XdrByteArray

public XdrByteArray(int len)
Construct an XdrByteArray that can hold the given number of bytes.
Parameters:
len - The length of byte array to create.

XdrByteArray

public XdrByteArray(byte[] buf)
Construct an XdrByteArray that wraps the given buffer.
Parameters:
buf - The existing buffer to wrap.

XdrByteArray

public XdrByteArray(byte[] buf,
                    int offset)
Construct an XdrByteArray that wraps the given buffer.
Parameters:
buf - The existing buffer to wrap.
offset - The starting point in the given buffer.

XdrByteArray

public XdrByteArray(byte[] buf,
                    int offset,
                    int len)
Construct an XdrByteArray that wraps the given buffer.
Parameters:
buf - The existing buffer to wrap.
offset - The starting point in the given buffer.
len - The number of bytes in "buf" to wrap.
Method Detail

SKIP

public final void SKIP(int offset)
Parameters:
offset - The number of bytes to adjust the current index position by.

PUT

public final void PUT(boolean x)

PUT

public final void PUT(byte x)

PUT

public final void PUT(short x)

PUT

public final void PUT(int x)

PUTLE

public final void PUTLE(short x)

PUTLE

public final void PUTLE(int x)

PUT

public final void PUT(float x)

PUT

public final void PUT(double x)

PUT

public final void PUT(long x)

PUTLE

public final void PUTLE(long x)

PUT

public final void PUT(java.lang.String x)

PUT

public final void PUT(ByteArray x)

PUT

public final void PUT(byte[] x)

PUT

public final void PUT(byte[] x,
                      int start,
                      int length)

BOOLEAN

public final boolean BOOLEAN()

BYTE

public final byte BYTE()

SHORT

public final short SHORT()

INT

public final int INT()

LESHORT

public final short LESHORT()

LEINT

public final int LEINT()

FLOAT

public final float FLOAT()

DOUBLE

public final double DOUBLE()

LONG

public final long LONG()

LELONG

public final long LELONG()

STRING

public final java.lang.String STRING()

BYTEARRAY

public final ByteArray BYTEARRAY()

BYTES

public final void BYTES(byte[] x,
                        int start,
                        int length)

BYTES

public final byte[] BYTES(int length)

toString

public java.lang.String toString()
Overrides:
toString in class ByteArray
Following copied from class: bees.core.ByteArray
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/