All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.doit.io.ByteArray

java.lang.Object
   |
   +----org.doit.io.ByteArray

public class ByteArray
extends Object
Class used to represent an array of bytes as an Object.

Author:
Mark Boyns

Variable Index

 o bytes
 o offset

Constructor Index

 o ByteArray()
Create a ByteArray with the default size.
 o ByteArray(byte[])
Create a ByteArray from an array of bytes.
 o ByteArray(int)
Create a ByteArray with a specific default size.
 o ByteArray(String)
Create a ByteArray from a String.

Method Index

 o append(byte)
Append a byte.
 o append(byte[])
Append an array of bytes.
 o append(ByteArray)
Append a ByteArray.
 o append(String)
Append a String.
 o chop()
 o chop(int)
 o erase()
 o get(int)
 o getBytes()
Return the bytes.
 o length()
Return the number of bytes.
 o main(String[])
 o toString()
Convert to String.

Variables

 o bytes
 public byte bytes[]
 o offset
 public int offset

Constructors

 o ByteArray
 public ByteArray()
Create a ByteArray with the default size.

 o ByteArray
 public ByteArray(int size)
Create a ByteArray with a specific default size.

 o ByteArray
 public ByteArray(String s)
Create a ByteArray from a String.

 o ByteArray
 public ByteArray(byte b[])
Create a ByteArray from an array of bytes.

Methods

 o append
 public void append(byte ch)
Append a byte.

 o append
 public void append(ByteArray b)
Append a ByteArray.

 o append
 public void append(byte b[])
Append an array of bytes.

 o append
 public void append(String s)
Append a String.

 o toString
 public String toString()
Convert to String.

Overrides:
toString in class Object
 o getBytes
 public byte[] getBytes()
Return the bytes.

 o get
 public byte get(int i)
 o length
 public int length()
Return the number of bytes.

 o erase
 public void erase()
 o chop
 public void chop()
 o chop
 public void chop(int i)
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index