Package com.datecs.fiscalprinter.SDK
Class FiscalSocket
java.lang.Object
com.datecs.fiscalprinter.SDK.FiscalSocket
public class FiscalSocket
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFiscalSocket.Listener -
Constructor Summary
Constructors Constructor Description FiscalSocket(java.io.InputStream in, java.io.OutputStream out) -
Method Summary
Modifier and Type Method Description voidclear()voidclose()voidflush()voidread(byte[] buf, int offset, int len, int timeout)intread(int timeout)byte[]read(int bytes, int timeout)static voidsetDebugLevel(java.util.logging.Level level)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)
-
Constructor Details
-
FiscalSocket
public FiscalSocket(java.io.InputStream in, java.io.OutputStream out)- Parameters:
in-out-
-
-
Method Details
-
setDebugLevel
public static void setDebugLevel(java.util.logging.Level level)- Parameters:
level-
-
close
public void close() -
write
public void write(int b) throws java.io.IOException- Parameters:
b-- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException- Parameters:
b-- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Parameters:
b-off-len-- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Throws:
java.io.IOException
-
clear
public void clear() throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read(int timeout) throws java.io.IOException- Parameters:
timeout-- Returns:
- Throws:
java.io.IOException
-
read
public byte[] read(int bytes, int timeout) throws java.io.IOException- Parameters:
bytes-timeout-- Returns:
- Throws:
java.io.IOException
-
read
public void read(byte[] buf, int offset, int len, int timeout) throws java.io.IOException- Parameters:
buf-offset-len-timeout-- Throws:
java.io.IOException
-