| java.lang.Object org.netbeans.editor.ext.FileAccessor
FileAccessor | public class FileAccessor implements DataAccessor(Code) | | DataAccessor for Code Completion DB files via RandomAccessFile implementation
author: Martin Roskanin |
Method Summary | |
public 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.
Parameters: buffer - the buffer from which the data is appended. Parameters: off - the start offset of the data in the buffer. Parameters: len - the number of bytes to append. | public void | close() | public int | getFileLength() | public long | getFilePointer() Returns the current offset in this file. | public void | open(boolean requestWrite) | public void | read(byte[] buffer, int off, int len) Reads up to len bytes of data from this file resource into an array of bytes. | public void | resetFile() | public void | seek(long pos) | public String | toString() |
FileAccessor | public FileAccessor(File file)(Code) | | Creates a new instance of FileAccessor
|
append | public void append(byte[] buffer, int off, int len) throws IOException(Code) | | Appends exactly len bytes, starting at off of the buffer pointer
to the end of file resource.
Parameters: buffer - the buffer from which the data is appended. Parameters: off - the start offset of the data in the buffer. Parameters: len - the number of bytes to append. the actual file offset before appending. |
getFileLength | public int getFileLength()(Code) | | |
getFilePointer | public long getFilePointer() throws IOException(Code) | | Returns the current offset in this file.
the offset from the beginning of the file, in bytes,at which the next read or write occurs. |
open | public void open(boolean requestWrite) throws IOException(Code) | | Opens DataAccessor file resource
Parameters: requestWrite - if true, file is opened for read/write operation. |
read | public void read(byte[] buffer, int off, int len) throws IOException(Code) | | Reads up to len bytes of data from this file resource into an array of bytes.
Parameters: buffer - the buffer into which the data is read. Parameters: off - the start offset of the data. Parameters: len - the maximum number of bytes read. |
resetFile | public void resetFile() throws IOException(Code) | | Clears the file and sets the offset to 0
|
|
|