Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Search an PrinterInputStream class ?

Thread view: 
pcouas - 19 Oct 2005 09:25 GMT
Hi,

My Java program read a flow which come from a an external program and
has been devlopped for a Printer.
So flow contains special character like \r for returning at the
begining of line.
Someone has devlop an PrinterInputStream Class ?

Regards
Philippe
Roedy Green - 19 Oct 2005 09:39 GMT
>My Java program read a flow which come from a an external program and
>has been devlopped for a Printer.
>So flow contains special character like \r for returning at the
>begining of line.
>Someone has devlop an PrinterInputStream Class ?

the simplest way would be to override the  line.separator property.

System.setProperty ( "line.separator", "\r" );

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

pcouas - 19 Oct 2005 09:49 GMT
When flow contains \r, datas must stay on same line, but at begining of
current line, and if flow is blank caracter don't override previous
data.
Line separator could be \f or \r\f

Philippe
Roedy Green - 19 Oct 2005 11:12 GMT
>When flow contains \r, datas must stay on same line, but at begining of
>current line, and if flow is blank caracter don't override previous
>data.
>Line separator could be \f or \r\f

You probably want to read the stream char by char yourself and search
for line endings.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.