|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
org.blinkenbyte.io.ReadWriteDevice.RWDOutputStream
public static class ReadWriteDevice.RWDOutputStream
Implementation of an OutputStream wrapped around a ReadWriteDevice.
| Field Summary | |
|---|---|
protected boolean |
isClosed
Flag indicating if this stream has been closed. |
ReadWriteDevice |
rwd
The ReadWriteDevice being wrapped. |
| Constructor Summary | |
|---|---|
ReadWriteDevice.RWDOutputStream(ReadWriteDevice _rwd)
Constructs a new RWDOutputStream from a ReadWriteDevice. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this stream (but not the underlying ReadWriteDevice). |
void |
flush()
Flushes this stream. |
protected void |
throwIfClosed()
Convenience method to throw an exception if the stream has been closed. |
void |
write(byte[] b)
Writes b.length bytes from array b to the stream. |
void |
write(byte[] b,
int offset,
int len)
Writes len bytes from array b at offset b[offset] to the stream. |
void |
write(int b)
Writes a single byte to the stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ReadWriteDevice rwd
protected boolean isClosed
| Constructor Detail |
|---|
public ReadWriteDevice.RWDOutputStream(ReadWriteDevice _rwd)
| Method Detail |
|---|
protected void throwIfClosed()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b,
int offset,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||