public interface DataAccessor
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte[] buffer,
int off,
int len)
Appends exactly
len bytes, starting at off of the buffer pointer
to the end of file resource. |
void |
close()
Closes DataAccessor file resource
|
int |
getFileLength() |
long |
getFilePointer()
Returns the current offset in this file.
|
void |
open(boolean requestWrite)
Opens DataAccessor file resource
|
void |
read(byte[] buffer,
int off,
int len)
Reads up to len bytes of data from this file resource into an array of bytes.
|
void |
resetFile()
Clears the file and sets the offset to 0
|
void |
seek(long pos)
Sets the file-pointer offset, measured from the beginning of this
file, at which the next read or write occurs.
|
void open(boolean requestWrite)
throws IOException
requestWrite - if true, file is opened for read/write operation.IOExceptionvoid close()
throws IOException
IOExceptionvoid read(byte[] buffer,
int off,
int len)
throws IOException
buffer - the buffer into which the data is read.off - the start offset of the data.len - the maximum number of bytes read.IOExceptionvoid append(byte[] buffer,
int off,
int len)
throws IOException
len bytes, starting at off of the buffer pointer
to the end of file resource.buffer - the buffer from which the data is appended.off - the start offset of the data in the buffer.len - the number of bytes to append.IOExceptionlong getFilePointer()
throws IOException
IOExceptionvoid resetFile()
throws IOException
IOExceptionvoid seek(long pos)
throws IOException
IOExceptionint getFileLength()
Built on May 16 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.