| java.lang.Object org.netbeans.modules.editor.gsfret.FileObjectAccessor
FileObjectAccessor | public class FileObjectAccessor implements DataAccessor(Code) | | This file is originally from Retouche, the Java Support
infrastructure in NetBeans. I have modified the file as little
as possible to make merging Retouche fixes back as simple as
possible.
DataAccessor for Code Completion DB files via FileObject streams
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. | 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 exactly len bytes from this file resource into the byte
array, starting at the current file pointer. | public void | resetFile() | public void | seek(long pos) Sets the file-pointer offset, measured from the beginning of this
file, at which the next read or write occurs. | public String | toString() |
FileObjectAccessor | public FileObjectAccessor(FileObject fo)(Code) | | |
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. |
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 exactly len bytes from this file resource into the byte
array, starting at the current file pointer. This method reads
repeatedly from the file until the requested number of bytes are
read. This method blocks until the requested number of bytes are
read, the end of the inputStream is detected, or an exception is thrown.
Parameters: buffer - the buffer into which the data is read. Parameters: off - the start offset of the data. Parameters: len - the number of bytes to read. |
resetFile | public void resetFile() throws IOException(Code) | | Clears the file and sets the offset to 0
|
seek | public void seek(long pos) throws IOException(Code) | | Sets the file-pointer offset, measured from the beginning of this
file, at which the next read or write occurs.
|
|
|