|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jwall.web.audit.io.BinaryReader
public class BinaryReader
A reader which reads bytes from an input-stream and also supports
reading a whole line returned as string.
NOTE: This class might not be portable!
| Constructor Summary | |
|---|---|
BinaryReader(java.io.InputStream in)
This method creates a new instance of the BinaryReader class that is connected to the given InputStream. |
|
BinaryReader(java.io.InputStream in,
java.io.OutputStream out)
This creates a BinaryReader which simultanously writes the input to the given output-stream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the underlying input-stream and marks this reader as closed. |
long |
getPosision()
This method returns the offset from the beginning of the stream. |
boolean |
isClosed()
Wether this reader has been closed or not. |
byte[] |
readByteLine()
Returns an array of bytes from the current position of the read-head to the next occurence of a LF-byte, but at most 8192 bytes. |
byte[] |
readBytes(int k)
This method reads k bytes from the input stream an returns them
as an array. |
java.lang.String |
readline()
This reads bytes of the stream until a newline (0x13) is reached. |
boolean |
ready()
The reader is ready if it is not closed and data is available from the underlying input-stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryReader(java.io.InputStream in)
in - The input stream that is to be read from.
public BinaryReader(java.io.InputStream in,
java.io.OutputStream out)
| Method Detail |
|---|
public java.lang.String readline()
throws java.io.IOException
java.io.IOException
public byte[] readByteLine()
throws java.io.IOException
java.io.IOException
public byte[] readBytes(int k)
throws java.io.IOException
k bytes from the input stream an returns them
as an array.
k - The number of bytes to read.
java.io.IOException
public boolean ready()
throws java.io.IOException
true, if the reader is not closed and data is available.
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOExceptionpublic boolean isClosed()
true, if the reader has been closed.public long getPosision()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||