| java.lang.Object org.netbeans.editor.DocCacheSupport
All known Subclasses: org.netbeans.editor.MemCacheSupport,
DocCacheSupport | abstract class DocCacheSupport (Code) | | DocCacheSupport is a base class for caching document which is got by some
reader and enable its editing.
author: Miloslav Metelka version: 1.00 |
Method Summary | |
public void | destroy() | public void | ensureCapacity(int capacity) Helps to do less allocations if the initial file size is known. | public char[] | getDirectModeBuffer() | final public int | getDocLength() | abstract public void | insert(int pos, char buffer, int offset, int len) Insert buffer into the document at specified position. | abstract public void | insertString(int pos, String text, int offset, int len) Insert string into the document at specified position. | abstract public void | read(int pos, char buffer, int offset, int len) Reading from the temporary storage into destination buffer. | abstract public void | remove(int pos, int len) Delete a specified count of chars at specified position. | public void | save(Writer writer) Saving the tepmorary document to a writer. | public boolean | supportsDirectMode() | abstract public void | write(int pos, char buffer, int offset, int len) Write buffer at the specified position. |
docLen | protected int docLen(Code) | | Current document length in characters
|
statCharsRead | long statCharsRead(Code) | | Count of characters read
|
statCharsWritten | long statCharsWritten(Code) | | Count of characters written
|
destroy | public void destroy()(Code) | | Destroy the CacheSupport (delete temp file etc.)
|
ensureCapacity | public void ensureCapacity(int capacity)(Code) | | Helps to do less allocations if the initial file size is known. By
default it's not implemented.
Parameters: capacity - space that will be preallocated |
getDirectModeBuffer | public char[] getDirectModeBuffer()(Code) | | |
getDocLength | final public int getDocLength()(Code) | | Getter: Document length
|
insert | abstract public void insert(int pos, char buffer, int offset, int len) throws BadLocationException(Code) | | Insert buffer into the document at specified position.
Parameters: pos - insertion position in temp storage document Parameters: buffer - source buffer with insertion data Parameters: offset - offset of data in the buffer Parameters: len - length of data in buffer |
insertString | abstract public void insertString(int pos, String text, int offset, int len) throws BadLocationException(Code) | | Insert string into the document at specified position.
Parameters: pos - insertion position in temp storage document Parameters: text - text to insert Parameters: offset - offset of data in the buffer Parameters: len - length of data in buffer |
read | abstract public void read(int pos, char buffer, int offset, int len) throws BadLocationException(Code) | | Reading from the temporary storage into destination buffer.
Parameters: pos - position in temp storage Parameters: buffer - target storage Parameters: offset - offset in buffer Parameters: len - length of data in buffer to write |
remove | abstract public void remove(int pos, int len) throws BadLocationException(Code) | | Delete a specified count of chars at specified position.
Parameters: pos - position of removal in temp storage Parameters: len - length of data to remove |
save | public void save(Writer writer) throws IOException(Code) | | Saving the tepmorary document to a writer.
Parameters: writer - writer where to write data from temp storage |
supportsDirectMode | public boolean supportsDirectMode()(Code) | | |
write | abstract public void write(int pos, char buffer, int offset, int len) throws BadLocationException(Code) | | Write buffer at the specified position. Rewrites part of the document. It
can write beyond the end of the document, however the initial position
must be inside or at the end of the document.
Parameters: pos - position in temp storage Parameters: buffer - buffer with source data Parameters: offset - offset of data in buffer Parameters: len - length of data in buffer |
|
|