com.java4less.textprinter
Class PrinterPort

java.lang.Object
  |
  +--com.java4less.textprinter.PrinterPort
Direct Known Subclasses:
FilePort, HDParallelPort

public abstract class PrinterPort
extends java.lang.Object


Constructor Summary
PrinterPort()
           
 
Method Summary
 void close()
          closes port
 int getTimeout()
          time (milliseconds) to wait for the bytes to be sent to the printer
 java.lang.Boolean isBusy()
          is the printer busy?
 java.lang.Boolean isInError()
          is printer in Error?
 java.lang.Boolean isOnline()
          is printer online?
 java.lang.Boolean isPaperOut()
          is paper out?
 void open()
          opens port
 void setTimeout(int i)
          time (milliseconds) to wait for the bytes to be sent to the printer
 void write(byte[] s)
          Writes an array of bytes to the port
 void write(byte[] s, int len)
          Writes an array of bytes to the port
 void write(java.lang.String s)
          Writes a string to the port
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrinterPort

public PrinterPort()
Method Detail

setTimeout

public void setTimeout(int i)
time (milliseconds) to wait for the bytes to be sent to the printer


getTimeout

public int getTimeout()
time (milliseconds) to wait for the bytes to be sent to the printer


open

public void open()
          throws TextPrinterException
opens port

TextPrinterException

close

public void close()
           throws TextPrinterException
closes port

TextPrinterException

write

public void write(byte[] s,
                  int len)
           throws TextPrinterException
Writes an array of bytes to the port

TextPrinterException

write

public void write(byte[] s)
           throws TextPrinterException
Writes an array of bytes to the port

TextPrinterException

write

public void write(java.lang.String s)
           throws TextPrinterException
Writes a string to the port

TextPrinterException

isOnline

public java.lang.Boolean isOnline()
is printer online? returns null if the information is not known.


isInError

public java.lang.Boolean isInError()
is printer in Error? returns null if the information is not known.


isPaperOut

public java.lang.Boolean isPaperOut()
is paper out? returns null if the information is not known.


isBusy

public java.lang.Boolean isBusy()
is the printer busy? returns null if the information is not known.