All Packages Class Hierarchy This Package Previous Next Index
Any implementation of this interface must be thread-safe!
TODO: I don't like that read and write return ints. They should return
nothing, but throw an IOException in case of an error. Unlike
InputStream, a FSFile knows its size, so callers can check how much they
can read before they read. They don't need the return value to see how
much has been read.
Besides, action methods returning ints or pointers are C-style. In Java,
these methods usually return void.
public abstract int read(byte[] b, int off, int len) throws IOException
public abstract int write(byte[] b, int off, int len) throws IOException
public abstract void close() throws IOException
public abstract void flush() throws IOException
public abstract long getFilePointer() throws IOException
public abstract long getFileSize() throws IOException
public abstract void setFilePointer(long pos) throws IOException
public abstract void truncate() throws IOException
All Packages Class Hierarchy This Package Previous Next Index