|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.sun.spot.io.j2me.remoteprinting.RemotePrintOutputStream
public class RemotePrintOutputStream
Helper class for "remoteprint:" connections. This class provides an OutputStream that will stream data to another Spot using a radio connection. This class is needed to automatically flush the radio stream whenever a newline is printed. It also reports back to the RemotePrinting client if the connection is broken.
Constructor Summary | |
---|---|
RemotePrintOutputStream(String address)
Creates a new RemotePrintOutputStream piping its output to a new RadioOutputStream. |
Method Summary | |
---|---|
void |
close()
Close this OutputStream along with the underlying RadioOutputStream. |
void |
flush()
Flush any characters in our buffer, sending them over the radio to the remote print server. |
void |
write(int arg0)
Writes out a character, flushing the buffer if a newline. |
Methods inherited from class java.io.OutputStream |
---|
write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemotePrintOutputStream(String address)
address
- the IEEE radio address of the remote print server and the port to useMethod Detail |
---|
public void write(int arg0) throws IOException
write
in class OutputStream
arg0
- the character to write to the remote print server
IOException
OutputStream.write(int)
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
OutputStream.write(int)
public void close() throws IOException
Flushes any characters in the buffer before closing the OutputStream.
close
in interface Closeable
close
in class OutputStream
IOException
OutputStream.close()
|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |