Package org.apache.commons.io.build
Class AbstractOrigin.WriterOrigin
java.lang.Object
org.apache.commons.io.build.AbstractSupplier<Writer,AbstractOrigin.WriterOrigin>
 
org.apache.commons.io.build.AbstractOrigin<Writer,AbstractOrigin.WriterOrigin>
 
org.apache.commons.io.build.AbstractOrigin.WriterOrigin
- All Implemented Interfaces:
- IOSupplier<Writer>
- Enclosing class:
- AbstractOrigin<T,- B extends AbstractOrigin<T, - B>> 
public static class AbstractOrigin.WriterOrigin
extends AbstractOrigin<Writer,AbstractOrigin.WriterOrigin> 
A 
Writer origin.
 This origin cannot provide conversions to other aspects.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.commons.io.build.AbstractOriginAbstractOrigin.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.WriterOrigin 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetOutputStream(OpenOption... options) Gets this origin as an OutputStream, if possible.getWriter(Charset charset, OpenOption... options) Gets a new Writer on the origin, buffered by default.Methods inherited from class org.apache.commons.io.build.AbstractOriginget, getByteArray, getByteArray, getCharSequence, getFile, getInputStream, getPath, getRandomAccessFile, getReader, size, toStringMethods inherited from class org.apache.commons.io.build.AbstractSupplierasThisMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.io.function.IOSupplierasSupplier, getUnchecked
- 
Constructor Details- 
WriterOriginConstructs a new instance for the given origin.- Parameters:
- origin- The origin, not null.
 
 
- 
- 
Method Details- 
getOutputStreamGets this origin as an OutputStream, if possible.The optionsparameter is ignored since aWriterdoes not need anOpenOptionto be written.- Overrides:
- getOutputStreamin class- AbstractOrigin<Writer,- AbstractOrigin.WriterOrigin> 
- Parameters:
- options- options specifying how the file is opened
- Returns:
- this origin as an OutputStream, if possible.
- Throws:
- IOException- if an I/O error occurs.
 
- 
getWriterGets a new Writer on the origin, buffered by default.The charsetparameter is ignored since aWriterdoes not need aCharsetto be written.The optionsparameter is ignored since aWriterdoes not need anOpenOptionto be written.- Overrides:
- getWriterin class- AbstractOrigin<Writer,- AbstractOrigin.WriterOrigin> 
- Parameters:
- charset- the charset to use for encoding
- options- options specifying how the file is opened
- Returns:
- a new Writer on the origin.
- Throws:
- IOException- if an I/O error occurs opening or creating the file.
 
 
-