public interface DatabaseStream
| Modifier and Type | Method and Description |
|---|---|
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.
|
int getFirstDataLocation()
void safeWrite(long location,
int data)
throws IOException
IOExceptionvoid safeWrite(long location1,
int data1,
long location2,
int data2)
throws IOException
IOExceptionvoid safeWrite(long location1,
int data1,
long location2,
int data2,
long location3,
int data3,
long location4,
int data4)
throws IOException
IOExceptionint readIntAt(long location)
throws IOException
IOExceptionvoid writeIntAt(long location,
int value)
throws IOException
IOExceptionvoid writeAll(long location,
byte[] data,
int offset,
int length)
throws IOException
IOExceptionvoid readAll(long location,
byte[] data,
int offset,
int length)
throws IOException
IOExceptionvoid zero(long location,
int numBytes)
throws IOException
IOExceptionboolean truncateTo(long length)
throws IOException
IOExceptionboolean setDecryptor(DataProcessor decryptor) throws IOException
IOExceptionboolean setDecryptorAndEncryptor(DataProcessor decryptor, DataProcessor encryptor) throws IOException
IOExceptionboolean atEOF(long location)
throws IOException
IOExceptionlong length()
throws IOException
IOExceptionvoid flush()
throws IOException
IOExceptionvoid close()
throws IOException
IOExceptionvoid delete()
throws IOException
IOExceptionvoid rename(String newName) throws IOException
IOExceptionTime getModifiedTime() throws IOException
IOExceptionboolean setModifiedTime(Time t) throws IOException
IOExceptionboolean temporaryClose()
throws IOException
IOException - if an error occurs.void reopen()
throws IOException
IOException - if an error occurs.boolean canWrite()