| |
|
| java.lang.Object org.netbeans.editor.ext.FileStorage
FileStorage | public class FileStorage (Code) | | Management of storage of the data for the java completion.
author: Miloslav Metelka, Martin Roskanin version: 1.00 |
bytes | byte[] bytes(Code) | | Byte array holding the data that were read from file
|
chars | char[] chars(Code) | | Shared char array to use for reading strings
|
fileNotFound | public boolean fileNotFound(Code) | | |
offset | int offset(Code) | | Current offset in the bytes array
|
openedForWrite | boolean openedForWrite(Code) | | |
FileStorage | public FileStorage(String fileName)(Code) | | Parameters: fileName - name of file to operate over |
getInteger | public int getInteger()(Code) | | Get the integer value from the bytes[] array
|
getOffset | public int getOffset()(Code) | | |
getString | public String getString()(Code) | | Get the string value from the bytes[] array
|
lockFile | final public synchronized void lockFile()(Code) | | Locks the file and disable other threads to write
|
putInteger | public void putInteger(int i)(Code) | | Put the integer into bytes[] array. It is stored as four bytes in big
endian.
|
putString | public void putString(String s)(Code) | | Put the string into bytes[] array. First the length is stored by
putInteger() and then all the characters as two bytes each in big endian.
|
read | public void read(int len) throws IOException(Code) | | Read some part of the file into the begining of bytes array and reset
offset to zero.
|
resetBytes | public void resetBytes()(Code) | | |
resetFile | public void resetFile() throws IOException(Code) | | Reset the size of the file and set current offset to zero.
|
setOffset | public void setOffset(int offset)(Code) | | |
setVersion | public void setVersion(int ver)(Code) | | Setter for version of parser DB file.
|
toString | public String toString()(Code) | | Returns name of the file
|
unlockFile | final public synchronized void unlockFile()(Code) | | Unlocks the file and notifies wqiting threads
|
write | public void write() throws IOException(Code) | | Write bytes array (with offset length) to the file
|
|
|
|