public class TextInput extends BufferInput
| Constructor and Description |
|---|
TextInput(java.io.InputStream is)
Constructor.
|
TextInput(IO io)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
content()
Retrieves and returns the whole text and closes the stream.
|
java.lang.String |
encoding()
Returns the encoding.
|
TextInput |
encoding(java.lang.String enc)
Explicitly sets a new encoding.
|
int |
read()
Returns the next byte (see
InputStream.read(). |
close, length, length, mark, markSupported, next, readBytes, readString, reset, sizepublic TextInput(java.io.InputStream is)
throws java.io.IOException
is - input streamjava.io.IOException - I/O exceptionpublic TextInput(IO io) throws java.io.IOException
io - inputjava.io.IOException - I/O exceptionpublic java.lang.String encoding()
public TextInput encoding(java.lang.String enc) throws java.io.IOException
enc - encoding (ignored if set to null)java.io.IOException - I/O Exceptionpublic int read()
throws java.io.IOException
BufferInputInputStream.read().
-1 is returned if all bytes have been read.read in class BufferInputjava.io.IOException - I/O exceptionpublic byte[] content()
throws java.io.IOException
BufferInputcontent in class BufferInputjava.io.IOException - I/O exception