Class AbstractOrigin.OutputStreamOrigin

    • Constructor Detail

      • OutputStreamOrigin

        public OutputStreamOrigin​(java.io.OutputStream origin)
        Constructs a new instance for the given origin.
        Parameters:
        origin - The origin.
    • Method Detail

      • getOutputStream

        public java.io.OutputStream getOutputStream​(java.nio.file.OpenOption... options)
        Description copied from class: AbstractOrigin
        Gets this origin as an OutputStream, if possible.
        Overrides:
        getOutputStream in class AbstractOrigin<java.io.OutputStream,​AbstractOrigin.OutputStreamOrigin>
        Parameters:
        options - options specifying how the file is opened
        Returns:
        this origin as an OutputStream, if possible.
      • getWriter

        public java.io.Writer getWriter​(java.nio.charset.Charset charset,
                                        java.nio.file.OpenOption... options)
                                 throws java.io.IOException
        Description copied from class: AbstractOrigin
        Gets a new Writer on the origin, buffered by default.
        Overrides:
        getWriter in class AbstractOrigin<java.io.OutputStream,​AbstractOrigin.OutputStreamOrigin>
        Parameters:
        charset - the charset to use for encoding
        options - options specifying how the file is opened
        Returns:
        a new Writer on the origin.
        Throws:
        java.io.IOException - if an I/O error occurs opening or creating the file.