|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is not part of the Ewe Simple Database specification. This is used for an actual implementation of Simple Database, specifically by RecordFile.
| Method Summary | |
boolean |
atEOF(long location)
|
boolean |
canWrite()
Tests if the DatabaseStream was opened in read-write mode as opposed to read-ony mode. |
void |
close()
|
void |
delete()
|
void |
flush()
|
int |
getFirstDataLocation()
Return the location of where you can store your data. |
Time |
getModifiedTime()
|
long |
length()
|
void |
readAll(long location,
byte[] data,
int offset,
int length)
This throws an exception if all the specified bytes are not found at the specified location. |
int |
readIntAt(long location)
|
void |
rename(String newName)
|
void |
reopen()
Reopen the stream after a temporaryClose(). |
void |
safeWrite(long location,
int data)
A safeWrite() is one where the integer data is either stored completely at the specified location or not at all. |
void |
safeWrite(long location1,
int data1,
long location2,
int data2)
|
void |
safeWrite(long location1,
int data1,
long location2,
int data2,
long location3,
int data3,
long location4,
int data4)
|
boolean |
setDecryptor(DataProcessor decryptor)
|
boolean |
setDecryptorAndEncryptor(DataProcessor decryptor,
DataProcessor encryptor)
|
boolean |
setModifiedTime(Time t)
|
boolean |
temporaryClose()
Close the stream temporarily. |
boolean |
truncateTo(long length)
Try to truncate to a particular length. |
void |
writeAll(long location,
byte[] data,
int offset,
int length)
|
void |
writeIntAt(long location,
int value)
|
void |
zero(long location,
int numBytes)
This should extend the Stream if necessary. |
| Method Detail |
public int getFirstDataLocation()
public void safeWrite(long location,
int data)
throws IOException
IOException
public void safeWrite(long location1,
int data1,
long location2,
int data2)
throws IOException
IOException
public void safeWrite(long location1,
int data1,
long location2,
int data2,
long location3,
int data3,
long location4,
int data4)
throws IOException
IOException
public int readIntAt(long location)
throws IOException
IOException
public void writeIntAt(long location,
int value)
throws IOException
IOException
public void writeAll(long location,
byte[] data,
int offset,
int length)
throws IOException
IOException
public void readAll(long location,
byte[] data,
int offset,
int length)
throws IOException
IOException
public void zero(long location,
int numBytes)
throws IOException
IOException
public boolean truncateTo(long length)
throws IOException
IOException
public boolean setDecryptor(DataProcessor decryptor)
throws IOException
IOException
public boolean setDecryptorAndEncryptor(DataProcessor decryptor,
DataProcessor encryptor)
throws IOException
IOException
public boolean atEOF(long location)
throws IOException
IOException
public long length()
throws IOException
IOException
public void flush()
throws IOException
IOException
public void close()
throws IOException
IOException
public void delete()
throws IOException
IOException
public void rename(String newName)
throws IOException
IOException
public Time getModifiedTime()
throws IOException
IOException
public boolean setModifiedTime(Time t)
throws IOException
IOException
public boolean temporaryClose()
throws IOException
IOException - if an error occurs.
public void reopen()
throws IOException
IOException - if an error occurs.public boolean canWrite()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||