|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.java4less.textprinter.PrinterPort | +--com.java4less.textprinter.ports.FilePort
Class used to access the printer using a file. For example, in windows you can use:
- "PRN:" for a local printer
- "//server/printername:" for a network printer
- "/dev/lpr": for Linux
Constructor Summary | |
FilePort(java.lang.String filename)
|
Method Summary | |
void |
close()
closes port |
void |
open()
opens port |
void |
run()
start writer thread |
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 com.java4less.textprinter.PrinterPort |
getTimeout, isBusy, isInError, isOnline, isPaperOut, setTimeout, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilePort(java.lang.String filename)
Method Detail |
public void open() throws TextPrinterException
open
in class PrinterPort
TextPrinterException
public void close() throws TextPrinterException
close
in class PrinterPort
TextPrinterException
public void write(java.lang.String s) throws TextPrinterException
write
in class PrinterPort
TextPrinterException
public void write(byte[] s, int len) throws TextPrinterException
write
in class PrinterPort
TextPrinterException
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |