public class BufferContent extends SwtCharBuffer implements CharSeq
chars, lineOffsets
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE
Constructor and Description |
---|
BufferContent() |
BufferContent(int initialSize) |
Modifier and Type | Method and Description |
---|---|
void |
addTextChangeListener(TextChangeListener textChangeListener) |
void |
consume(int start,
int count,
Consumer out) |
void |
fill(char value)
Set all the elements to a given character.
|
void |
fill(int fromIndex,
int toIndex,
char value) |
int |
getCharCount() |
java.lang.String |
getLine(int lineIndex) |
int |
getLineAtOffset(int pos) |
int |
getLineCount() |
java.lang.String |
getLineDelimiter() |
int |
getOffsetAtLine(int lineIndex) |
java.lang.String |
getTextRange(int start,
int length) |
void |
insertFile(java.io.Reader in,
int pos) |
int |
lineStartPos(int pos) |
void |
removeTextChangeListener(TextChangeListener textChangeListener) |
void |
replaceTextRange(int start,
int length,
java.lang.String newText) |
void |
save(java.io.Writer out) |
void |
setCharAt(int index,
char value) |
void |
setText(java.lang.String newText) |
java.lang.CharSequence |
subSequence(int start,
int end) |
void |
writeTo(java.lang.Appendable dest) |
void |
writeTo(int start,
int count,
java.lang.Appendable dest)
Append a specified subsequence to an
Appendable . |
charAt, delete, gapReserve, getChars, insert, length, offset2pos, pos2offset, printable, shiftGap, show, toString
add, addPos, consumePosRange, createPos, fill, fillPosRange, gapReserve, get, getNextKind, getSegment, hasNext, isAfterPos, nextIndex, removePosRange, set, size
add, addAll, addAll, clear, compare, compare, compare, consume, consumeNext, contains, containsAll, copyPos, createRelativePos, elements, endPos, equals, equals, fill, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasPrevious, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, retainAll, set, setPosNext, setPosPrevious, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedException
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
consume
public BufferContent()
public BufferContent(int initialSize)
initialSize
- public void addTextChangeListener(TextChangeListener textChangeListener)
public void removeTextChangeListener(TextChangeListener textChangeListener)
public int getCharCount()
public java.lang.String getLine(int lineIndex)
public int getLineAtOffset(int pos)
public int getLineCount()
public java.lang.String getLineDelimiter()
public int getOffsetAtLine(int lineIndex)
public java.lang.String getTextRange(int start, int length)
public void replaceTextRange(int start, int length, java.lang.String newText)
public void setText(java.lang.String newText)
public int lineStartPos(int pos)
public void consume(int start, int count, Consumer out)
public void insertFile(java.io.Reader in, int pos) throws java.io.IOException
java.io.IOException
public void fill(char value)
CharSeq
public void fill(int fromIndex, int toIndex, char value)
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface CharSeq
subSequence
in interface java.lang.CharSequence
subSequence
in class SwtCharBuffer
public void writeTo(int start, int count, java.lang.Appendable dest) throws java.io.IOException
CharSeq
Appendable
.
An allowable implementation is:
dest.append(this, start, start+count)
.
Hence implementors of Appendable
should avoid calling
writeTo
- though they can call getChars
.public void writeTo(java.lang.Appendable dest) throws java.io.IOException
public void save(java.io.Writer out) throws java.io.IOException
out
- java.io.IOException