public static class AbstractOrigin.WriterOrigin extends AbstractOrigin<Writer,AbstractOrigin.WriterOrigin>
Writer origin.
This origin cannot provide conversions to other aspects.
AbstractOrigin.AbstractRandomAccessFileOrigin<T extends RandomAccessFile,B extends AbstractOrigin.AbstractRandomAccessFileOrigin<T,B>>, AbstractOrigin.ByteArrayOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.IORandomAccessFileOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.RandomAccessFileOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOriginorigin| Constructor and Description |
|---|
WriterOrigin(Writer origin)
Constructs a new instance for the given origin.
|
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getOutputStream(OpenOption... options)
Gets this origin as an OutputStream, if possible.
|
Writer |
getWriter(Charset charset,
OpenOption... options)
Gets a new Writer on the origin, buffered by default.
|
get, getByteArray, getByteArray, getCharSequence, getFile, getInputStream, getPath, getRandomAccessFile, getReader, size, toStringasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasSupplier, getUncheckedpublic WriterOrigin(Writer origin)
origin - The origin, not null.public OutputStream getOutputStream(OpenOption... options) throws IOException
The options parameter is ignored since a Writer does not need an OpenOption to be written.
getOutputStream in class AbstractOrigin<Writer,AbstractOrigin.WriterOrigin>options - options specifying how the file is openedIOException - if an I/O error occurs.public Writer getWriter(Charset charset, OpenOption... options) throws IOException
The charset parameter is ignored since a Writer does not need a Charset to be written.
The options parameter is ignored since a Writer does not need an OpenOption to be written.
getWriter in class AbstractOrigin<Writer,AbstractOrigin.WriterOrigin>charset - the charset to use for encodingoptions - options specifying how the file is openedIOException - if an I/O error occurs opening or creating the file.