All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.io
Class EchoingPrintStream

    com.sas.io.EchoingPrintStream

All Implemented Interfaces:
  com.sas.PublicClonable, java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable, java.lang.Cloneable

Deprecated. Since java.io.PrintStream is somewhat deprecated in favor of java.io.PrintWriter, you should similarly choose com.sas.io.EchoingPrintWriter over PrintStream

    public class EchoingPrintStream

implements com.sas.PublicClonable

EchoingPrintStream echoes print output to a secondary PrintStream. All strings printed to this stream are also printed to the secondary stream.

See Also:
  `EchoingPrintWriter`

Constructor Summary
`EchoingPrintStream(java.io.OutputStream primary)` Deprecated. Construct an EchoingPrintStream which prints to both a primary OutputStream and to Standard.out
`EchoingPrintStream(java.io.OutputStream primary, java.io.PrintStream secondary)` Deprecated. Construct an EchoingPrintStream which prints to both a primary OutputStream and to a secondary PrintStream.

Method Summary
`java.lang.Object` | `clone()` Deprecated. Create a copy of the current EchoingPrintStream
`void` | `close()` Deprecated. Close the print streams.
`void` | `close(boolean closeSecondary)` Deprecated. Close the print streams.
`void` | `print(java.lang.String s)` Deprecated. Print a string to both output streams.
`void` | `println(java.lang.String s)` Deprecated. Print a string and a newline to both output streams.

Constructor Detail

### EchoingPrintStream

    public EchoingPrintStream(java.io.OutputStream primary)

  Deprecated.
  Construct an EchoingPrintStream which prints to both a primary OutputStream and to Standard.out

  Parameters:
    `primary` - an output stream to print to.

### EchoingPrintStream

    public EchoingPrintStream(java.io.OutputStream primary,
                              java.io.PrintStream secondary)

  Deprecated.
  Construct an EchoingPrintStream which prints to both a primary OutputStream and to a secondary PrintStream.

  Parameters:
    `primary` - an output stream to print to.
    `secondary` - a secondary PrintStream to which output is also printed.

Method Detail

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Deprecated.
  Create a copy of the current EchoingPrintStream

  Specified by:
    `clone` in interface `com.sas.PublicClonable`
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    a clone of this EchoingPrintStream
  Throws:
    `java.lang.CloneNotSupportedException` - if the object cannot be cloned.

### print

    public void print(java.lang.String s)

  Deprecated.
  Print a string to both output streams.

  Overrides:
    `print` in class `java.io.PrintStream`
  Parameters:
    `s` - a string value.

### println

    public void println(java.lang.String s)

  Deprecated.
  Print a string and a newline to both output streams.

  Overrides:
    `println` in class `java.io.PrintStream`
  Parameters:
    `s` - a string value.

### close

    public void close()

  Deprecated.
  Close the print streams.

  Specified by:
    `close` in interface `java.io.Closeable`
  Specified by:
    `close` in interface `java.lang.AutoCloseable`
  Overrides:
    `close` in class `java.io.PrintStream`

### close

    public void close(boolean closeSecondary)

  Deprecated.
  Close the print streams.

  Parameters:
    `closeSecondary` - if true, also close the secondary stream. if false, only close this stream.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.