- java.lang.Object
-
- net.morimekta.strings.chr.CharReader
-
-
Constructor Summary
Constructors Constructor Description CharReader(InputStream in)
CharReader(Reader in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Char
read()
Read the next char.Char
readIfAvailable()
Read a single char if ready (something is available in the input stream), otherwise return null.
-
-
-
Constructor Detail
-
CharReader
public CharReader(InputStream in)
-
CharReader
public CharReader(Reader in)
-
-
Method Detail
-
readIfAvailable
public Char readIfAvailable() throws IOException
Read a single char if ready (something is available in the input stream), otherwise return null.- Returns:
- The read char or null of not ready.
- Throws:
IOException
- If failed to read from input.
-
read
public Char read() throws IOException
Read the next char.- Returns:
- The next char, or null of input stream is closed.
- Throws:
IOException
- If unable to read a char.
-
-