Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.io   Previous This
Package
Next

 


Class SystemOutputStream

public class SystemOutputStream extends FilterOutputStream
{
  // Constructors
  public SystemOutputStream (OutputStream out, int id);

  // Methods
  public void close () throws IOException;
  public void write(byte b[], int off, int len) throws IOException;
}

This class provides methods that allow an application to hand an output stream to untrusted code and prevent the untrusted code from closing it. System.out and System.err objects are wrapped with this class, which extends the FilterOutputStream class.

FilterOutputStream
  |
  +--SystemOutputStream

Constructors

SystemOutputStream

public SystemOutputStream (OutputStream out, int id);

Creates a SystemOutputStream object by using the specified output stream and an identifier. The identifier will be used for security checks.

ParameterDescription
out The output stream.
id The identifier for the new SystemOutputStream object.

Methods

close

public void close () throws IOException;

Closes the system output stream.

Return Value:

No return value.

Exceptions:

IOException if an error occurs while attempting to close the output stream.

write

public void write(byte b[], int off, int len) throws IOException;

Writes bytes to the output stream from an array, starting at a specified offset in the array.

Return Value:

No return value.

ParameterDescription
b The array to write from.
off The offset in the array, where the first byte to write is located.
len The number of bytes to write.

Exceptions:

IOException if an error occurs while attempting to write to the output stream.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.