public class TextInput extends BufferInput
encoding()
.
UTF-8 will be used as default encoding.Constructor and Description |
---|
TextInput(InputStream is)
Constructor.
|
TextInput(IO io)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TokenBuilder |
cache()
Retrieves the whole text and closes the stream.
|
byte[] |
content()
Retrieves and returns the whole data and closes the stream.
|
String |
encoding()
Returns the encoding.
|
TextInput |
encoding(String enc)
Sets a new encoding.
|
int |
read()
Returns the next character.
|
TextInput |
validate(boolean v)
Checks the input for valid XML characters and throws an exception if invalid
characters are found.
|
close, io, length, mark, markSupported, readBytes, readString, reset, size
available, read, read, skip
public TextInput(InputStream is) throws IOException
is
- input streamIOException
- I/O exceptionpublic TextInput(IO io) throws IOException
io
- inputIOException
- I/O exceptionpublic final String encoding()
public final TextInput validate(boolean v)
v
- flag to be setpublic TextInput encoding(String enc) throws IOException
enc
- encodingIOException
- I/O Exceptionpublic int read() throws IOException
read
in class BufferInput
IOException
- I/O exceptionpublic final byte[] content() throws IOException
BufferInput
content
in class BufferInput
IOException
- I/O exceptionpublic final TokenBuilder cache() throws IOException
IOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.