Each StorageRandomAccessFile has an associated file pointer, a byte offset in the file. All reading and writing takes place at the file pointer offset and advances it.
An implementation of StorageRandomAccessFile need not be thread safe. The database engine single-threads access to each StorageRandomAccessFile instance. Two threads will not access the same StorageRandomAccessFile instance at the same time.
|Method from org.apache.derby.io.StorageRandomAccessFile Summary:|
|close, getFilePointer, length, read, seek, setLength, sync|
|Method from org.apache.derby.io.StorageRandomAccessFile Detail:|
public void close() throws IOException
public long getFilePointer() throws IOException
public long length() throws IOException
public int read(byte b, int off, int len) throws IOException
public void seek(long newFilePointer) throws IOException
public void setLength(long newLength) throws IOException
If the file is extended then the contents of the extension are not defined.
If the file is truncated and the file pointer is greater than the new length then the file pointer is set to the new length.
public void sync(boolean metaData) throws IOException