|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FileObject
This interface represents a random access file.
Method Summary | |
---|---|
void |
close()
Close the file. |
long |
getFilePointer()
Get the file pointer. |
java.lang.String |
getName()
Get the full qualified name of this file. |
long |
length()
Get the length of the file. |
void |
readFully(byte[] b,
int off,
int len)
Read from the file. |
void |
releaseLock()
Release the file lock. |
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. |
boolean |
tryLock()
Try to lock the file exclusively. |
void |
write(byte[] b,
int off,
int len)
Write to the file. |
Method Detail |
---|
long length() throws java.io.IOException
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
void readFully(byte[] b, int off, int len) throws java.io.IOException
b
- the byte arrayoff
- the offsetlen
- the number of bytes
java.io.IOException
void seek(long pos) throws java.io.IOException
pos
- the new position
java.io.IOException
void write(byte[] b, int off, int len) throws java.io.IOException
b
- the byte arrayoff
- the offsetlen
- the number of bytes
java.io.IOException
long getFilePointer() throws java.io.IOException
java.io.IOException
void sync() throws java.io.IOException
java.io.IOException
void setFileLength(long newLength) throws java.io.IOException
newLength
- the new length
java.io.IOException
java.lang.String getName()
boolean tryLock()
void releaseLock()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |