Methods Summary |
---|
public IErrorOutput | getErrorOutput()Returns the errorOutputImpl class object.
return this.errorOutputImpl;
|
public static synchronized com.sun.enterprise.cli.framework.InputsAndOutputs | getInstance()Singleton method that returns an instance of InputsAndOutputs
if (sIO == null)
{
sIO = new InputsAndOutputs();
}
return sIO;
|
public IUserInput | getUserInput()Returns the userInput object that is set in InputsAndOutputs.
return this.userInput;
|
public IUserOutput | getUserOutput()Returns the userOutputImpl class object.
return this.userOutputImpl;
|
public void | setErrorOutput(java.io.OutputStream os)Creates and sets the errorOutputImpl class with the given OutputStream
object.
this.errorOutputImpl.close();
this.errorOutputImpl = new ErrorOutputImpl( os, false );
|
public void | setErrorOutputFile(java.lang.String fileName)Set the output file name and force new output to this file
immediately.
Any existing output will be flushed and closed.
FileOutputStream errorOutputFile = new FileOutputStream( fileName );
this.errorOutputImpl.close();
this.errorOutputImpl = new ErrorOutputImpl( errorOutputFile, true );
|
public static void | setInstance(com.sun.enterprise.cli.framework.InputsAndOutputs iao)Singleton method that sets the instance of InputsAndOutputs
if (iao == null) {
if (sIO!=null) {
try {
sIO.userOutputImpl.close();
sIO.userInput.close();
}
catch (Exception e){
e.printStackTrace();
}
}
sIO = new InputsAndOutputs();
return;
}
if (iao != null && sIO != iao)
sIO = iao;
|
public void | setUserInput(IUserInput userInput)Sets the userInput object in the InputsAndOutputs.
this.userInput.close();
this.userInput = userInput;
|
public void | setUserInput(java.io.InputStream is)Sets the InputStream object in the InputsAndOutputs.
userInput.close();
this.userInput = new UserInput(is);
|
public void | setUserInput(java.io.InputStream is, java.lang.String sEncoding)Sets the InputStream object in the InputsAndOutputs with specified
character set.
userInput.close();
this.userInput = new UserInput(is);
this.userInput.setEncoding(sEncoding);
|
public void | setUserInputFile(java.lang.String fileName)Set the input to a file name
final FileInputStream userInputFile = new FileInputStream( fileName );
setUserInput(userInputFile);
|
public void | setUserInputFile(java.lang.String fileName, java.lang.String sEncoding)Set the input to a file name with specified encoding
final FileInputStream userInputFile = new FileInputStream( fileName );
setUserInput(userInputFile, sEncoding);
|
public void | setUserOutput(java.io.OutputStream os)Creates and sets the userOutputImpl class with the given OutputStream
object.
this.userOutputImpl.close();
this.userOutputImpl = new UserOutputImpl( os, false );
|
public void | setUserOutputFile(java.lang.String fileName)Set the output file name and force new output to this file
immediately.
Any existing output will be flushed and closed.
FileOutputStream userOutputFile = new FileOutputStream( fileName );
this.userOutputImpl.close();
this.userOutputImpl = new UserOutputImpl( userOutputFile, true );
|