This is in WinNT and W2K i'm using MS J++
I'm writing to a serial port (com1) in this port is a serial printer connected.
My problem is where the data that i'm writing to the port is too large, the printer stops printing before ending all the bytes i'm writing. There is no exception thrown.
The print method is called for every byte, but i store
them in a byte array and when it reaches to 511 bytes I send it to the printer.
protected void print(byte byte0)
byArrSend[count] = byte0;
//When I receive 511 bytes then write to the printer.
//or byte 25 which means cut paper.
if(count == 511 || byte0 == 25)
boolean blnError = false;
dc2 = new FileOutputStream("Com" + intNumPort);
pw = new BufferedOutputStream(dc2);
char chr = new char;
byArrSend = new byte;
count = 0;
blnError = true;
If i increase de sleep time, I got more characters writed in the printer, but if the document is too large anyway the printer stops printing.
I think maybe I have to check for the CTS (clear to send) or something like that, but how do i do that??
Thanks in advance.