public static class AbstractOrigin.OutputStreamOrigin extends AbstractOrigin<java.io.OutputStream,AbstractOrigin.OutputStreamOrigin>
OutputStream
origin.
This origin cannot provide some of the other aspects.
AbstractOrigin.ByteArrayOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOrigin
origin
Constructor and Description |
---|
OutputStreamOrigin(java.io.OutputStream origin)
Constructs a new instance for the given origin.
|
Modifier and Type | Method and Description |
---|---|
java.io.OutputStream |
getOutputStream(java.nio.file.OpenOption... options)
Gets this origin as an OutputStream, if possible.
|
java.io.Writer |
getWriter(java.nio.charset.Charset charset,
java.nio.file.OpenOption... options)
Gets a new Writer on the origin, buffered by default.
|
get, getByteArray, getByteArray, getCharSequence, getFile, getInputStream, getPath, getReader, size, toString
asThis
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asSupplier
public OutputStreamOrigin(java.io.OutputStream origin)
origin
- The origin.public java.io.OutputStream getOutputStream(java.nio.file.OpenOption... options)
AbstractOrigin
getOutputStream
in class AbstractOrigin<java.io.OutputStream,AbstractOrigin.OutputStreamOrigin>
options
- options specifying how the file is openedpublic java.io.Writer getWriter(java.nio.charset.Charset charset, java.nio.file.OpenOption... options) throws java.io.IOException
AbstractOrigin
getWriter
in class AbstractOrigin<java.io.OutputStream,AbstractOrigin.OutputStreamOrigin>
charset
- the charset to use for encodingoptions
- options specifying how the file is openedjava.io.IOException
- if an I/O error occurs opening or creating the file.