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. |
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. |
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 |
index
public int index
- The current index into the byte array. This is incremented whenever
data is written to or read from the array.
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.
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()
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/