|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.datecs.api.printer.ProtocolAdapter.Channel
public class ProtocolAdapter.Channel
This class represents a protocol channel.
| Method Summary | |
|---|---|
void |
close()
Close channel. |
int |
getChannel()
Gets the channel number. |
java.io.InputStream |
getInputStream()
Gets the input stream from channel. |
java.io.OutputStream |
getOutputStream()
Gets the input stream from channel. |
byte[] |
getStatus()
Gets status data from channel. |
void |
open()
Open channel. |
void |
setChannel(int speed,
int flow)
Sets channel associated port. |
void |
setLedMode(int mode)
Set LED indicator mode. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int getChannel()
public void open()
throws java.io.IOException
Call this method before any other.
The CHANNEL_PRINTER is opened by default.
java.io.IOException - if an I/O error occurs.
public void close()
throws java.io.IOException
The CHANNEL_PRINTER must not be closed.
java.io.IOException - if an I/O error occurs.
public void setChannel(int speed,
int flow)
throws java.io.IOException
speed - the speed of channel.flow - the flow control of channel.
java.io.IOException - if an I/O error occurs.
public void setLedMode(int mode)
throws java.io.IOException
mode - the LED mode. The valid values can be:
java.io.IOException - if an I/O error occurs.
public byte[] getStatus()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||