public class LoggerFiscalPort extends java.lang.Object implements FiscalPort
Modifier and Type | Field and Description |
---|---|
protected java.io.PrintWriter |
log |
Constructor and Description |
---|
LoggerFiscalPort(FiscalPort port,
java.io.PrintStream log) |
LoggerFiscalPort(FiscalPort port,
java.io.PrintWriter log) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the port.
|
void |
flushAndWait()
Flush the output stream and wait until output is done.
|
int |
getBaudRate()
Get the baud rate.
|
FiscalPort |
getFiscalPort()
Get the underlying fiscal port.
|
java.io.InputStream |
getInputStream()
Get the input stream.
|
java.io.OutputStream |
getOutputStream()
Get the output stream.
|
int |
getTimeout()
Get the receive timeout.
|
boolean |
isOpen()
Returns true if the port is open.
|
void |
open()
Open the port.
|
void |
setBaudRate(int baudRate)
Set the baud rate.
|
void |
setTimeout(int ms)
Set the receive timeout.
|
public LoggerFiscalPort(FiscalPort port, java.io.PrintWriter log)
public LoggerFiscalPort(FiscalPort port, java.io.PrintStream log)
public FiscalPort getFiscalPort()
public void open() throws java.lang.Exception
FiscalPort
open
in interface FiscalPort
java.lang.Exception
public void close() throws java.lang.Exception
FiscalPort
close
in interface FiscalPort
java.lang.Exception
public boolean isOpen()
FiscalPort
isOpen
in interface FiscalPort
public void setTimeout(int ms) throws java.lang.Exception
FiscalPort
setTimeout
in interface FiscalPort
java.lang.Exception
public int getTimeout() throws java.lang.Exception
FiscalPort
getTimeout
in interface FiscalPort
java.lang.Exception
public void setBaudRate(int baudRate) throws java.lang.Exception
FiscalPort
setBaudRate
in interface FiscalPort
java.lang.UnsupportedOperationException
- if baud rates are not applicable to this type of port.java.lang.Exception
public int getBaudRate() throws java.lang.Exception
FiscalPort
getBaudRate
in interface FiscalPort
java.lang.UnsupportedOperationException
- if baud rates are not applicable to this type of port.java.lang.Exception
public java.io.InputStream getInputStream() throws java.io.IOException
FiscalPort
getInputStream
in interface FiscalPort
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
FiscalPort
getOutputStream
in interface FiscalPort
java.io.IOException
public void flushAndWait() throws java.io.IOException
FiscalPort
flushAndWait
in interface FiscalPort
java.io.IOException