| org.h2.store.fs.FileObject
All known Subclasses: org.h2.store.fs.FileObjectZip, org.h2.store.fs.FileObjectMemory, org.h2.store.fs.FileObjectDisk, org.h2.store.fs.FileObjectDatabase,
FileObject | public interface FileObject (Code) | | This interface represents a random access file.
|
Method Summary | |
void | close() Close the file. | long | getFilePointer() Get the file pointer. | long | length() Get the length of the file. | void | readFully(byte[] b, int off, int len) Read from the file. | void | seek(long pos) Go to the specified position in the file. | void | setFileLength(long newLength) Change the length of the file. | void | sync() Force changes to the physical location. | void | write(byte[] b, int off, int len) Write to the file. |
getFilePointer | long getFilePointer() throws IOException(Code) | | Get the file pointer.
the current file pointer |
readFully | void readFully(byte[] b, int off, int len) throws IOException(Code) | | Read from the file.
Parameters: b - the byte array Parameters: off - the offset Parameters: len - the number of bytes |
seek | void seek(long pos) throws IOException(Code) | | Go to the specified position in the file.
Parameters: pos - the new position |
setFileLength | void setFileLength(long newLength) throws IOException(Code) | | Change the length of the file.
Parameters: newLength - the new length |
write | void write(byte[] b, int off, int len) throws IOException(Code) | | Write to the file.
Parameters: b - the byte array Parameters: off - the offset Parameters: len - the number of bytes |
|
|