goodslib
Class ArrayOfByte

java.lang.Object
  extended bygoodsjpi.Persistent
      extended bygoodslib.AnyArray
          extended bygoodslib.ArrayOfByte
All Implemented Interfaces:
java.io.Serializable

public class ArrayOfByte
extends AnyArray

ArrayOfByte is just that, an array of bytes. It is fully persistent, as it it's derived from Persistent. All reads cause a fetch of the data, all writes mark it dirty and to be saved.

See Also:
Serialized Form

Field Summary
protected  byte[] array
           
 
Fields inherited from class goodslib.AnyArray
used
 
Fields inherited from class goodsjpi.Persistent
defaultMetaobject, metaobject
 
Constructor Summary
ArrayOfByte(byte[] src)
           
ArrayOfByte(int size)
           
ArrayOfByte(int size, int allocatedSize)
           
 
Method Summary
 void append(byte[] tail)
           
 void changeSize(int newSize)
           
 int compare(ArrayOfByte a)
           
 int compare(byte[] s)
           
 void copy(int dstIndex, byte[] src, int srcIndex, int count)
           
 boolean equals(java.lang.Object obj)
           
 byte getAt(int index)
           
 int hashCode()
           
 int indexOf(byte val)
           
 void insert(int index, int count, byte value)
           
 int lastIndexOf(byte val)
           
 byte pop()
           
 void push(byte value)
           
 void putAt(int index, byte value)
           
 void remove(int index, int count)
           
 byte[] toArray()
           
 byte top()
           
 java.lang.String toString()
           
 
Methods inherited from class goodslib.AnyArray
length
 
Methods inherited from class goodsjpi.Persistent
attachToStorage, clone, clusterWith, finalize, getDatabase, getOid, getStorageId, onLoad
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

array

protected byte[] array
Constructor Detail

ArrayOfByte

public ArrayOfByte(int size)

ArrayOfByte

public ArrayOfByte(int size,
                   int allocatedSize)

ArrayOfByte

public ArrayOfByte(byte[] src)
Method Detail

putAt

public void putAt(int index,
                  byte value)

getAt

public byte getAt(int index)

changeSize

public void changeSize(int newSize)

insert

public void insert(int index,
                   int count,
                   byte value)

remove

public void remove(int index,
                   int count)

push

public void push(byte value)

pop

public byte pop()

top

public byte top()

append

public void append(byte[] tail)

compare

public int compare(byte[] s)

compare

public int compare(ArrayOfByte a)

toString

public java.lang.String toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Persistent

equals

public boolean equals(java.lang.Object obj)

toArray

public byte[] toArray()

copy

public void copy(int dstIndex,
                 byte[] src,
                 int srcIndex,
                 int count)

indexOf

public int indexOf(byte val)

lastIndexOf

public int lastIndexOf(byte val)