|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.basex.io.in.BufferInput
org.basex.io.in.TextInput
public class TextInput
This class provides buffered access to textual input.
The input encoding will initially be guessed by analyzing the first bytes;
it can also be explicitly set by calling encoding()
.
UTF-8 will be used as default encoding.
Field Summary |
---|
Fields inherited from class org.basex.io.in.BufferInput |
---|
bpos, bsize, buffer, input, length |
Constructor Summary | |
---|---|
TextInput(java.io.InputStream is)
Constructor. |
|
TextInput(IO io)
Constructor. |
Method Summary | |
---|---|
TokenBuilder |
cache()
Retrieves the whole text and closes the stream. |
byte[] |
content()
Retrieves and returns the whole data and closes the stream. |
java.lang.String |
encoding()
Returns the encoding. |
TextInput |
encoding(java.lang.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. |
Methods inherited from class org.basex.io.in.BufferInput |
---|
close, io, length, mark, markSupported, readByte, readBytes, readString, reset, size |
Methods inherited from class java.io.InputStream |
---|
available, read, read, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextInput(java.io.InputStream is) throws java.io.IOException
is
- input stream
java.io.IOException
- I/O exceptionpublic TextInput(IO io) throws java.io.IOException
io
- input
java.io.IOException
- I/O exceptionMethod Detail |
---|
public final java.lang.String encoding()
public final TextInput validate(boolean v)
v
- flag to be set
public TextInput encoding(java.lang.String enc) throws java.io.IOException
enc
- encoding
java.io.IOException
- I/O Exceptionpublic int read() throws java.io.IOException
read
in class BufferInput
java.io.IOException
- I/O exceptionInputStream.read()
public final byte[] content() throws java.io.IOException
BufferInput
content
in class BufferInput
java.io.IOException
- I/O exceptionpublic final TokenBuilder cache() throws java.io.IOException
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |