|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IOHandler
This interface provides an abstraction layer for the communication with the printer which can be done for example using com ports (J2SE) or a serial bluetooth profile (J2ME) depending on the platform and its implementation.
It encapsulates a connection which has to provide an input and an output stream.
| Method Summary | |
|---|---|
void |
connect(java.lang.String id)
Establishes a connection using the given identifier. |
void |
disconnect()
Closes the associated connection if connected. |
java.io.InputStream |
getInputStream()
Gets an input stream of the associated connection. |
java.io.OutputStream |
getOutputStream()
Gets an output stream of the associated connection. |
boolean |
isConnected()
|
void |
setLogHandler(LogHandler logHandler)
Sets the log handler. |
| Method Detail |
|---|
void connect(java.lang.String id)
throws java.io.IOException
id - Identifier of device to connect to (such as COMx)
java.io.IOException - If any io error occursvoid disconnect()
java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException - If any io error occurs
java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOException - If any io error occursboolean isConnected()
void setLogHandler(LogHandler logHandler)
logHandler - Log handler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||