Package org.eclipse.lemminx.commons
Class CharSequenceReader
java.lang.Object
java.io.Reader
org.eclipse.lemminx.commons.CharSequenceReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
A
Reader that reads from a CharSequence without requiring
conversion to String. This avoids the memory cost of materializing a
full String copy when the backing store is a StringBuilder.
Supports mark(int)/reset() for compatibility with parsers
(e.g. Xerces) that may use mark/reset during encoding detection.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Constructor Details
-
CharSequenceReader
-
-
Method Details
-
read
public int read() -
read
public int read(char[] cbuf, int off, int len) -
skip
public long skip(long n) -
ready
public boolean ready() -
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader
-
mark
public void mark(int readAheadLimit) -
reset
public void reset() -
close
public void close()
-