|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ssonet.io.ByteIOStream
This class constructs an IOStream from an Input- and an Outputstream.
Field Summary | |
static boolean |
debug
|
(package private) java.io.InputStream |
is
|
(package private) java.io.OutputStream |
os
|
(package private) int |
totalReadCount
for debugging purposes: count bytes read |
Constructor Summary | |
ByteIOStream(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
Constructs an IOStream. |
Method Summary | |
int |
available()
Returns number of bytes which can be read without blocking. |
void |
closeIn()
Closes underlying InputStream. |
void |
closeOut()
Closes underlying OutputStream. |
int |
read(byte[] buffer)
Reads into a buffer from the underlying stream. |
void |
write(byte[] buffer)
Writes buffer to the underlying stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean debug
java.io.InputStream is
java.io.OutputStream os
int totalReadCount
Constructor Detail |
public ByteIOStream(java.io.InputStream inputStream, java.io.OutputStream outputStream)
inputStream
- to read from.outputStream
- to write to.Method Detail |
public int read(byte[] buffer) throws java.io.IOException
read
in interface IOStream
buffer
- the buffer, which shall be filled with bytes read
java.io.IOException
- if an error occures while reading from the streamIOStream.read(byte[])
public void write(byte[] buffer) throws java.io.IOException
write
in interface IOStream
buffer
- the buffer holding the bytes to write to the stream
java.io.IOException
- if an error occures while writing to the streamIOStream.write(byte[])
public void closeIn() throws java.io.IOException
closeIn
in interface IOStream
java.io.IOException
IOStream.closeIn()
public void closeOut() throws java.io.IOException
closeOut
in interface IOStream
java.io.IOException
IOStream.closeOut()
public int available() throws java.io.IOException
available
in interface IOStream
java.io.IOException
IOStream.available()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |