public final class NewlineInput extends TextInput
\r\n, \n, \r) will be normalized to
newline characters \n, and the input encoding will be guessed by
analyzing the first bytes.| Constructor and Description |
|---|
NewlineInput(java.io.InputStream is)
Constructor.
|
NewlineInput(IO in)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
NewlineInput |
encoding(java.lang.String encoding)
Explicitly sets a new encoding.
|
int |
read()
Returns the next byte (see
InputStream.read(). |
java.lang.String |
readLine()
Reads a single line.
|
close, length, length, mark, markSupported, next, readBytes, readString, reset, sizepublic NewlineInput(java.io.InputStream is)
throws java.io.IOException
is - input streamjava.io.IOException - I/O exceptionpublic NewlineInput(IO in) throws java.io.IOException
in - inputjava.io.IOException - I/O exceptionpublic NewlineInput encoding(java.lang.String encoding) throws java.io.IOException
TextInputpublic int read()
throws java.io.IOException
BufferInputInputStream.read().
-1 is returned if all bytes have been read.public java.lang.String readLine()
throws java.io.IOException
java.io.IOException - I/O exception