Class SyncOutput

  • All Implemented Interfaces:
    Output

    public final class SyncOutput
    extends Object
    implements Output
    Thread-safe Output.

    Objects of this class are thread safe.

    Since:
    0.18
    • Constructor Detail

      • SyncOutput

        public SyncOutput​(Output output)
        Ctor.
        Parameters:
        output - The output
      • SyncOutput

        public SyncOutput​(Output output,
                          Object lck)
        Ctor.
        Parameters:
        output - The output
        lck - The lock object
    • Method Detail

      • stream

        public OutputStream stream()
                            throws Exception
        Description copied from interface: Output
        Get write access to it.
        Specified by:
        stream in interface Output
        Returns:
        OutputStream to write to
        Throws:
        Exception - If something goes wrong