public class ProtocolAdapter.Channel
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
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 |
resume() |
void |
setChannel(int speed,
int flow)
Sets channel associated port.
|
void |
setLedMode(int mode)
Set LED indicator mode.
|
void |
suspend() |
public void suspend()
public void resume()
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()