Package com.google.common.io
Class CharSequenceReader
java.lang.Object
java.io.Reader
com.google.common.io.CharSequenceReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
A
Reader
that reads the characters in a CharSequence
. Like StringReader
,
but works with any CharSequence
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new reader wrapping the given character sequence. -
Method Summary
Methods inherited from class java.io.Reader
nullReader, read, transferTo
-
Field Details
-
seq
-
pos
private int pos -
mark
private int mark
-
-
Constructor Details
-
CharSequenceReader
Creates a new reader wrapping the given character sequence.
-
-
Method Details
-
checkOpen
- Throws:
IOException
-
hasRemaining
private boolean hasRemaining() -
remaining
private int remaining() -
read
- Specified by:
read
in interfaceReadable
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Specified by:
read
in classReader
- Throws:
IOException
-
skip
- Overrides:
skip
in classReader
- Throws:
IOException
-
ready
- Overrides:
ready
in classReader
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classReader
-
mark
- Overrides:
mark
in classReader
- Throws:
IOException
-
reset
- Overrides:
reset
in classReader
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-