Class OutputStreamOutputConverter<T>

  • Type Parameters:
    T - the type of the object that is written by this OutputConverter
    All Implemented Interfaces:
    OutputConverter<T>
    Direct Known Subclasses:
    JsonOutputConverter, StringOutputConverter, VoidOutputConverter

    public abstract class OutputStreamOutputConverter<T>
    extends Object
    implements OutputConverter<T>
    An abstract helper class that defines an OutputConverter of which the output source is a standard OutputStream. This class can be extended by an implementation of OutputConverter that makes use of an OutputStream as its output source. The object can then be converted into data that is written directly into the OutputStream.
    • Constructor Detail

      • OutputStreamOutputConverter

        public OutputStreamOutputConverter()
    • Method Detail

      • getOutputStream

        public OutputStream getOutputStream()
        Returns the OutputStream where this OutputConverter will write the converted object to.
        Returns:
        The OutputStream to use as the output source for this OutputConverter.
      • setOutputStream

        public void setOutputStream​(OutputStream outputStream)
        Sets the OutputStream to be used as the output source for this OutputConverter.
        Parameters:
        outputStream - The OutputStream to use as the output source for this OutputConverter.