DJmistral
asked on
PrintStream write(String) method
void executeScript(String script, PrintStream ps) throws IOException
{
String cmd = "source " + script;
Process p = Runtime.getRuntime().exec( cmd);
BufferedReader reader = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
String output = reader.readLine();
while (output != null)
{
ps.write(output);
output = reader.readLine();
} // end while
} // end executeScript(File, PrintStream)
Any reason why "ps.write(output)" gives:
write(java.lang.String) has private access in java.io.PrintStream
{
String cmd = "source " + script;
Process p = Runtime.getRuntime().exec(
BufferedReader reader = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
String output = reader.readLine();
while (output != null)
{
ps.write(output);
output = reader.readLine();
} // end while
} // end executeScript(File, PrintStream)
Any reason why "ps.write(output)" gives:
write(java.lang.String) has private access in java.io.PrintStream
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER