uk.ac.starlink.util

## Interface Destination

-     public interface Destination

  Defines an object which can return an output stream, and hence represents the potential destination of a stream of data. It is used in preference to an OutputStream so that you can avoid opening output files before you know you need them, so you don't get new empty files (possibly overwriting old ones) when a command fails.
  Since:
    29 Nov 2006

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Destination` | `SYSTEM_OUT` Destination which directs output to `System.out`.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.OutputStream` | `createStream()` Returns an output stream which will write to this destination.

- - ### Field Detail

    - #### SYSTEM_OUT

          static final Destination SYSTEM_OUT

      Destination which directs output to `System.out`.

  - ### Method Detail

    - #### createStream

          java.io.OutputStream createStream()
                                     throws java.io.IOException

      Returns an output stream which will write to this destination. This method is only intended to be called once for a given instance.
      Returns:
        output stream
      Throws:
        `java.io.IOException`