|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.editor.ext.FileAccessor
public class FileAccessor
DataAccessor for Code Completion DB files via RandomAccessFile implementation
| Constructor Summary | |
|---|---|
FileAccessor(File file)
Creates a new instance of FileAccessor |
|
| Method Summary | |
|---|---|
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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileAccessor(File file)
| Method Detail |
|---|
public void append(byte[] buffer,
int off,
int len)
throws IOException
len bytes, starting at off of the buffer pointer
to the end of file resource.
append in interface DataAccessorbuffer - 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.
IOException
public void read(byte[] buffer,
int off,
int len)
throws IOException
read in interface DataAccessorbuffer - the buffer into which the data is read.off - the start offset of the data.len - the maximum number of bytes read.
IOException
public void open(boolean requestWrite)
throws IOException
open in interface DataAccessorrequestWrite - if true, file is opened for read/write operation.
IOException
public void close()
throws IOException
close in interface DataAccessorIOException
public long getFilePointer()
throws IOException
getFilePointer in interface DataAccessorIOException
public void resetFile()
throws IOException
resetFile in interface DataAccessorIOException
public void seek(long pos)
throws IOException
DataAccessor
seek in interface DataAccessorIOExceptionpublic int getFileLength()
getFileLength in interface DataAccessorpublic String toString()
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||