All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.util.Database

java.lang.Object
   |
   +----com.bulletproof.util.Database

public class Database
extends Object

Variable Index

 o thisDatabaseIndex
This virtual Database index number

Constructor Index

 o Database()
Create a new virtual temporary database
 o Database(String)
Create a new virtual cachable database

Method Index

 o add(byte[])
Append the data to the database
 o add(char[], int, int)
Append the data to the database
 o add(String)
Append the data to the database
 o append(String)
Append the data to the first record
 o clear()
 o clearCaches()
Clear the cached databases
 o get()
Get the data for the zero record.
 o get(int)
Get the data for this record.
 o getBytes(int)
Get the data for this record.
 o getChars(int)
Get the data for this record.
 o remove(int)
 o set(int, byte[])
Set the value of the selected element
 o set(int, String)
Set the value of the selected element
 o set(String)
Set the value of the 0 element
 o size()

Variables

 o thisDatabaseIndex
 public int thisDatabaseIndex
This virtual Database index number

Constructors

 o Database
 public Database()
Create a new virtual temporary database

 o Database
 public Database(String cacheLookup)
Create a new virtual cachable database

Parameters:
cacheLookup - a unique 20 character string that will be used to gain access to this Database when the VM is reloaded the next time.

Methods

 o clearCaches
 public static void clearCaches()
Clear the cached databases

 o getBytes
 public synchronized byte[] getBytes(int index)
Get the data for this record. This can be likened to getting the value for a particular array index

 o getChars
 public synchronized char[] getChars(int index)
Get the data for this record. This can be likened to getting the value for a particular array index

 o get
 public synchronized String get(int index)
Get the data for this record. This can be likened to getting the value for a particular array index

 o get
 public synchronized String get()
Get the data for the zero record. This can be likened to getting the value for a particular array index

 o add
 public synchronized boolean add(byte data[])
Append the data to the database

Parameters:
data - the data to append in the form of a record
 o add
 public boolean add(char data[],
                    int offset,
                    int length)
Append the data to the database

Parameters:
data - the data to append in the form of a record
offset - the starting position to read from in the array
length - the number of characters to write
 o add
 public synchronized boolean add(String data)
Append the data to the database

Parameters:
data - the data to append in the form of a record
 o append
 public synchronized boolean append(String data)
Append the data to the first record

Parameters:
data - the data to append in the form of a record
 o set
 public synchronized boolean set(int index,
                                 byte data[])
Set the value of the selected element

Parameters:
data - the data to set for this record
 o set
 public synchronized boolean set(int index,
                                 String data)
Set the value of the selected element

Parameters:
data - the data to set for this record
 o set
 public synchronized boolean set(String data)
Set the value of the 0 element

Parameters:
data - the data to set for this record
 o clear
 public synchronized void clear()
 o remove
 public synchronized void remove(int index)
 o size
 public int size()

All Packages  Class Hierarchy  This Package  Previous  Next  Index