|
||||||||||
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
org.basex.io.in.NewlineInput
public final class NewlineInput
This class provides a convenient access to text input. System dependent
line breaks (\r\n
, \n
, \r
) will be normalized to
newline characters \n
, and the input encoding will be guessed by
analyzing the first bytes.
Field Summary |
---|
Fields inherited from class org.basex.io.in.BufferInput |
---|
bpos, bsize, buffer, input, length |
Constructor Summary | |
---|---|
NewlineInput(java.io.InputStream is)
Constructor. |
|
NewlineInput(IO in)
Constructor. |
Method Summary | |
---|---|
NewlineInput |
encoding(java.lang.String encoding)
Sets a new encoding. |
int |
read()
Returns the next character. |
java.lang.String |
readLine()
Reads and returns a single line. |
boolean |
readLine(TokenBuilder tb)
Copies a single line to the specified token builder. |
Methods inherited from class org.basex.io.in.TextInput |
---|
cache, content, encoding, validate |
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 NewlineInput(java.io.InputStream is) throws java.io.IOException
is
- input stream
java.io.IOException
- I/O exceptionpublic NewlineInput(IO in) throws java.io.IOException
in
- input
java.io.IOException
- I/O exceptionMethod Detail |
---|
public NewlineInput encoding(java.lang.String encoding) throws java.io.IOException
TextInput
encoding
in class TextInput
encoding
- encoding
java.io.IOException
- I/O Exceptionpublic int read() throws java.io.IOException
TextInput
read
in class TextInput
java.io.IOException
- I/O exceptionInputStream.read()
public java.lang.String readLine() throws java.io.IOException
null
java.io.IOException
- I/O exceptionpublic boolean readLine(TokenBuilder tb) throws java.io.IOException
tb
- token builder to be filled.
true
if more input was found
java.io.IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |