public class XMLInput extends InputStream
Modifier and Type | Method and Description |
---|---|
boolean |
add(byte[] value,
boolean spaces)
Inserts some bytes in the input stream.
|
void |
close() |
void |
encoding(String e)
Sets a new encoding.
|
IO |
io()
Returns the IO reference.
|
long |
length()
Returns the file length.
|
int |
line()
Returns the current line.
|
int |
pos()
Returns the current file position.
|
void |
prev(int p)
Jumps the specified number of characters back.
|
int |
read() |
available, mark, markSupported, read, read, reset, skip
public XMLInput(IO io) throws IOException
io
- input referenceIOException
- I/O exceptionpublic void encoding(String e) throws IOException
e
- encodingIOException
- I/O exceptionpublic IO io()
public void prev(int p)
p
- number of characterspublic int read() throws IOException
read
in class InputStream
IOException
public boolean add(byte[] value, boolean spaces) throws IOException
value
- values to insertspaces
- add spacesIOException
- I/O exceptionpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int pos()
public int line()
public long length()
Copyright © 2005–2023 BaseX Team. All rights reserved.