All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.ByteArray

java.lang.Object
   |
   +----COM.objectspace.jgl.ArrayAdapter
           |
           +----COM.objectspace.jgl.ByteArray

public class ByteArray
extends ArrayAdapter
ByteArray allows a native array of bytes to be accessed like a Container. It is particularly useful for applying generic algorithms like Sorting.sort() to a native array. The Byte array deals with Object requests as Integer objects


Constructor Index

 o ByteArray()
 o ByteArray(byte[])
 o ByteArray(ByteArray)

Method Index

 o at(int)
Return the integer at the specified index as a Integer object.
 o clone()
Return a shallow copy of myself.
 o elements()
Return an Enumeration of my components.
 o equals(ByteArray)
Return true if I contain the same items in the same order as another ByteArray.
 o equals(Object)
Return true if I'm equal to a specified object.
 o finish()
Return an iterator positioned immediately after my last item.
 o maxSize()
Return the maximum number of objects that I can contain.
 o put(int, Object)
Set the object at a specified index.
 o size()
Return the number of objects that I contain.
 o start()
Return an iterator positioned at my first item.
 o toString()
Return a string that describes me.

Constructors

 o ByteArray
  public ByteArray()
 o ByteArray
  public ByteArray(byte array[])
 o ByteArray
  public ByteArray(ByteArray array)

Methods

 o clone
  public synchronized Object clone()
Return a shallow copy of myself.

Overrides:
clone in class ArrayAdapter
 o toString
  public synchronized String toString()
Return a string that describes me.

Overrides:
toString in class Object
 o equals
  public boolean equals(Object object)
Return true if I'm equal to a specified object.

Parameters:
object - The object to compare myself against.
Returns:
true if I'm equal to the specified object.
Overrides:
equals in class ArrayAdapter
 o equals
  public synchronized boolean equals(ByteArray object)
Return true if I contain the same items in the same order as another ByteArray. Use equals() to compare the individual elements.

Parameters:
array - The ByteArray to compare myself against.
Returns:
true if I'm equal to the specified object.
 o size
  public int size()
Return the number of objects that I contain.

Overrides:
size in class ArrayAdapter
 o maxSize
  public int maxSize()
Return the maximum number of objects that I can contain.

Overrides:
maxSize in class ArrayAdapter
 o elements
  public synchronized Enumeration elements()
Return an Enumeration of my components.

Overrides:
elements in class ArrayAdapter
 o start
  public synchronized ForwardIterator start()
Return an iterator positioned at my first item.

Overrides:
start in class ArrayAdapter
 o finish
  public synchronized ForwardIterator finish()
Return an iterator positioned immediately after my last item.

Overrides:
finish in class ArrayAdapter
 o at
  public synchronized Object at(int index)
Return the integer at the specified index as a Integer object.

Parameters:
index - The index.
Overrides:
at in class ArrayAdapter
 o put
  public synchronized void put(int index,
                               Object object)
Set the object at a specified index. The object must be a Integer

Parameters:
index - The index.
object - The object to place at the specified index.
Throws: ClassCastException
if object is not a Integer
Throws: IndexOutOfBoundsException
if object is not a Integer
Overrides:
put in class ArrayAdapter

All Packages  Class Hierarchy  This Package  Previous  Next  Index