|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hcilab.btprinter.platform.j2me.IOHandlerImpl
public class IOHandlerImpl
This is an implementation of the IOHandler interface for the java 2 micro edition (J2ME). A javax.microedition.io.Connector is used to establish the bluetooth connection to the printer. Use a protocol identifier like btspp://0002c7207ba7:1 as identifier to connect.
| Field Summary | |
|---|---|
private javax.microedition.io.StreamConnection |
connection
Connection to the printer. |
private java.io.InputStream |
in
Associated input stream. |
private org.hcilab.btprinter.abstractionlayer.LogHandler |
logHandler
Log handler. |
private java.io.OutputStream |
out
Associated output stream. |
| Constructor Summary | |
|---|---|
IOHandlerImpl()
|
|
| Method Summary | |
|---|---|
void |
connect(java.lang.String id)
|
void |
disconnect()
|
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
boolean |
isConnected()
|
void |
setLogHandler(org.hcilab.btprinter.abstractionlayer.LogHandler logHandler)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.microedition.io.StreamConnection connection
private java.io.InputStream in
private org.hcilab.btprinter.abstractionlayer.LogHandler logHandler
private java.io.OutputStream out
| Constructor Detail |
|---|
public IOHandlerImpl()
| Method Detail |
|---|
public void connect(java.lang.String id)
throws java.io.IOException
connect in interface org.hcilab.btprinter.abstractionlayer.IOHandlerjava.io.IOExceptionpublic void disconnect()
disconnect in interface org.hcilab.btprinter.abstractionlayer.IOHandler
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface org.hcilab.btprinter.abstractionlayer.IOHandlerjava.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface org.hcilab.btprinter.abstractionlayer.IOHandlerjava.io.IOExceptionpublic boolean isConnected()
isConnected in interface org.hcilab.btprinter.abstractionlayer.IOHandlerpublic void setLogHandler(org.hcilab.btprinter.abstractionlayer.LogHandler logHandler)
setLogHandler in interface org.hcilab.btprinter.abstractionlayer.IOHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||