Talk:Parallel Communications

From Rxtx

Jump to: navigation, search

Greetings, I have tried to write in the port LPT1, a text file, in principle attempted with the instruction in a curl

String lines =""; while ((if lines = lector.readLine ()) != null) { System.out.println(lines); salida.write(lines.getBytes ()); }

and after reading in the page the code to be used

String lines; char [] lineaTotal=null; while ((if lines = lector.readLine ()) != null) { System.out.println(lines); lineaTotal=lines.toCharArray (); byte [] byteArray = CharToByteConverter.getConverter (UTF8) .convertAll(lineaTotal); salida.write(byteArray); }

But in both cases the result is the same one In the Printer it only leaves printed the first line of the source File, the one that inside the Curl, in System.out.println(lines) the reading is evidenced. I need help in this case, and that he/she could make.

Personal tools