Package org.apache.commons.io.build
Class AbstractOriginSupplier<T,B extends AbstractOriginSupplier<T,B>>  
java.lang.Object
org.apache.commons.io.build.AbstractSupplier<T,B>
 
org.apache.commons.io.build.AbstractOriginSupplier<T,B> 
- Type Parameters:
- T- the type of instances to build.
- B- the type of builder subclass.
- All Implemented Interfaces:
- IOSupplier<T>
- Direct Known Subclasses:
- AbstractStreamBuilder,- FileAlterationObserver.Builder
public abstract class AbstractOriginSupplier<T,B extends AbstractOriginSupplier<T,B>>  
extends AbstractSupplier<T,B> 
Abstracts building an instance of 
T.- Since:
- 2.12.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractOrigin<?, ?> Checks whether the origin is null.protected AbstractOrigin<?, ?> Gets the origin.protected booleanTests whether the origin is null.protected static AbstractOrigin.ByteArrayOriginnewByteArrayOrigin(byte[] origin) Constructs a new byte array origin for a byte array.protected static AbstractOrigin.CharSequenceOriginnewCharSequenceOrigin(CharSequence origin) Constructs a new CharSequence origin for a CharSequence.protected static AbstractOrigin.FileOriginnewFileOrigin(File origin) Constructs a new file origin for a file.protected static AbstractOrigin.FileOriginnewFileOrigin(String origin) Constructs a new file origin for a file path.protected static AbstractOrigin.InputStreamOriginnewInputStreamOrigin(InputStream origin) Constructs a new input stream origin for a file.protected static AbstractOrigin.OutputStreamOriginnewOutputStreamOrigin(OutputStream origin) Constructs a new output stream origin for a file.protected static AbstractOrigin.PathOriginnewPathOrigin(String origin) Constructs a new path name origin for a path name.protected static AbstractOrigin.PathOriginnewPathOrigin(Path origin) Constructs a new path origin for a file.protected static AbstractOrigin.RandomAccessFileOriginConstructs a new RandomAccessFile origin for a RandomAccessFile.protected static AbstractOrigin.IORandomAccessFileOriginConstructs a new RandomAccessFile origin for a RandomAccessFile.protected static AbstractOrigin.ReaderOriginnewReaderOrigin(Reader origin) Constructs a new reader origin for a reader.protected static AbstractOrigin.URIOriginnewURIOrigin(URI origin) Constructs a new reader origin for a URI.protected static AbstractOrigin.WriterOriginnewWriterOrigin(Writer origin) Constructs a new writer origin for a file.setByteArray(byte[] origin) Sets a new origin.setCharSequence(CharSequence origin) Sets a new origin.Sets a new origin.Sets a new origin.setInputStream(InputStream origin) Sets a new origin.protected BsetOrigin(AbstractOrigin<?, ?> origin) Sets a new origin.setOutputStream(OutputStream origin) Sets a new origin.Sets a new origin.Sets a new origin.setRandomAccessFile(RandomAccessFile origin) Sets a new origin.Sets a new origin.Sets a new origin.Sets a new origin.Sets a new origin.Methods inherited from class org.apache.commons.io.build.AbstractSupplierasThisMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.io.function.IOSupplierasSupplier, get, getUnchecked
- 
Constructor Details- 
AbstractOriginSupplierpublic AbstractOriginSupplier()Constructs a new instance for subclasses.
 
- 
- 
Method Details- 
newByteArrayOriginConstructs a new byte array origin for a byte array.- Parameters:
- origin- the byte array.
- Returns:
- a new byte array origin.
 
- 
newCharSequenceOriginConstructs a new CharSequence origin for a CharSequence.- Parameters:
- origin- the CharSequence.
- Returns:
- a new file origin.
- Since:
- 2.13.0
 
- 
newFileOriginConstructs a new file origin for a file.- Parameters:
- origin- the file.
- Returns:
- a new file origin.
 
- 
newFileOriginConstructs a new file origin for a file path.- Parameters:
- origin- the file path.
- Returns:
- a new file origin.
 
- 
newInputStreamOriginConstructs a new input stream origin for a file.- Parameters:
- origin- the input stream.
- Returns:
- a new input stream origin.
 
- 
newOutputStreamOriginConstructs a new output stream origin for a file.- Parameters:
- origin- the output stream.
- Returns:
- a new output stream origin.
 
- 
newPathOriginConstructs a new path origin for a file.- Parameters:
- origin- the path.
- Returns:
- a new path origin.
 
- 
newPathOriginConstructs a new path name origin for a path name.- Parameters:
- origin- the path name.
- Returns:
- a new path name origin.
 
- 
newRandomAccessFileOriginprotected static AbstractOrigin.IORandomAccessFileOrigin newRandomAccessFileOrigin(IORandomAccessFile origin) Constructs a new RandomAccessFile origin for a RandomAccessFile.- Parameters:
- origin- the reader.
- Returns:
- a new reader origin.
- Since:
- 2.18.0
 
- 
newRandomAccessFileOriginprotected static AbstractOrigin.RandomAccessFileOrigin newRandomAccessFileOrigin(RandomAccessFile origin) Constructs a new RandomAccessFile origin for a RandomAccessFile.- Parameters:
- origin- the reader.
- Returns:
- a new reader origin.
- Since:
- 2.18.0
 
- 
newReaderOriginConstructs a new reader origin for a reader.- Parameters:
- origin- the reader.
- Returns:
- a new reader origin.
 
- 
newURIOriginConstructs a new reader origin for a URI.- Parameters:
- origin- the URI.
- Returns:
- a new URI origin.
 
- 
newWriterOriginConstructs a new writer origin for a file.- Parameters:
- origin- the writer.
- Returns:
- a new writer.
 
- 
checkOriginChecks whether the origin is null.- Returns:
- the origin.
- Throws:
- IllegalStateException- if the- originis- null.
 
- 
getOriginGets the origin.- Returns:
- the origin.
 
- 
hasOriginTests whether the origin is null.- Returns:
- whether the origin is null.
 
- 
setByteArraySets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setCharSequenceSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
- Since:
- 2.13.0
 
- 
setFileSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setFileSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setInputStreamSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setOriginSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setOutputStreamSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setPathSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setPathSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setRandomAccessFileSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
- Since:
- 2.18.0
 
- 
setRandomAccessFileSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
- Since:
- 2.18.0
 
- 
setReaderSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setURISets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
- 
setWriterSets a new origin.- Parameters:
- origin- the new origin.
- Returns:
- thisinstance.
 
 
-