|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VRandomAccessable
Provides some RandomAccessFile methods (java.io.RandomAccessFile) which are shared by some VFS
implementations. (Currently localfs and SRB).
Note that this interface does NOT define seek,skip methods since this is an
interface to a remote file. No filedescriptors, etc are kept alive !
All methods should be Atomic. Parallel write (currently) results
in undefined behaviour as no lock methods are provided yet.
Although parallel writes to diferrent offsets in the
same file should work!. This is not tested.
RandomAccessFile
,
VStreamReadable
,
VStreamWritable
Method Summary | |
---|---|
int |
readBytes(long fileOffset,
byte[] buffer,
int bufferOffset,
int nrBytes)
Reads nrBytes from file starting to read from
fileOffset . |
void |
setLengthToZero()
Resets file length to zero. Currently setLength() is not supported by SRB so this method is currently the only method which can decrease the file size. |
void |
writeBytes(long fileOffset,
byte[] buffer,
int bufferOffset,
int nrBytes)
Writes nrBytes to the file starting
at position fileOffset in the file. |
Method Detail |
---|
void setLengthToZero() throws VlException
VlException
int readBytes(long fileOffset, byte[] buffer, int bufferOffset, int nrBytes) throws VlException
nrBytes
from file starting to read from
fileOffset
. Data is stored into the byte array
buffer[] starting at bufferOffset.
VlException
RandomAccessFile.readBytes(byte[], int, int)
void writeBytes(long fileOffset, byte[] buffer, int bufferOffset, int nrBytes) throws VlException
nrBytes
to the file starting
at position fileOffset in the file. Data is and reading
from byte array buffer[bufferOffset].
VlException
RandomAccessFile.writeBytes(byte[], int, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |