|
SunSPOT API V4.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 |
|---|
equals, 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 use| Method Detail |
|---|
public void write(int arg0)
throws IOException
write in class OutputStreamarg0 - the character to write to the remote print server
IOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.OutputStream.write(int)
public void flush()
throws IOException
flush in class OutputStreamIOException - if an I/O error occurs.OutputStream.write(int)
public void close()
throws IOException
Flushes any characters in the buffer before closing the OutputStream.
close in class OutputStreamIOException - if an I/O error occurs.OutputStream.close()
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||