public class HighlightedDocument.DocumentReader
extends java.io.Reader
implements java.lang.Readable
Constructor and Description |
---|
DocumentReader() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Has no effect.
|
int |
getPosition() |
void |
mark(int readAheadLimit)
Save a position for reset.
|
boolean |
markSupported()
This reader supports mark and reset.
|
int |
read()
Read a single character.
|
int |
read(char[] cbuf)
Read and fill the buffer.
|
int |
read(char[] cbuf,
int off,
int len)
Read and fill the buffer.
|
boolean |
ready() |
void |
reset()
Reset this reader to the last mark, or the beginning of the document
if a mark has not been set.
|
void |
seek(long n)
Seek to the given position in the document.
|
long |
skip(long n)
Skip characters of input.
|
void |
update(int pos,
int adjustment)
Updates the reader to reflect a change in the underlying model.
|
public void update(int pos, int adjustment)
pos
- the location of the insert/deleteadjustment
- the number of characters added/deletedpublic void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Reader
public void mark(int readAheadLimit)
mark
in class java.io.Reader
readAheadLimit
- ignored.public boolean markSupported()
markSupported
in class java.io.Reader
public int read()
read
in class java.io.Reader
public int read(char[] cbuf)
read
in class java.io.Reader
cbuf
- the buffer to fill.public int read(char[] cbuf, int off, int len)
read
in class java.io.Reader
cbuf
- the buffer to fill.off
- offset into the buffer to begin the fill.len
- maximum number of characters to put in the buffer.public boolean ready()
ready
in class java.io.Reader
public void reset()
reset
in class java.io.Reader
public long skip(long n)
skip
in class java.io.Reader
n
- number of characters to skip.public void seek(long n)
n
- the offset to which to seek.public int getPosition()