Class AbstractOrigin.URIOrigin
java.lang.Object
org.apache.commons.io.build.AbstractSupplier<URI, AbstractOrigin.URIOrigin>
org.apache.commons.io.build.AbstractOrigin<URI, AbstractOrigin.URIOrigin>
org.apache.commons.io.build.AbstractOrigin.URIOrigin
- All Implemented Interfaces:
IOSupplier<URI>
- Enclosing class:
AbstractOrigin<T, B extends AbstractOrigin<T,B>>
A
URI origin.- Since:
- 2.12.0
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractOrigin
AbstractOrigin.AbstractRandomAccessFileOrigin<T,B>, AbstractOrigin.ByteArrayOrigin, AbstractOrigin.ChannelOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.IORandomAccessFileOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.RandomAccessFileOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOrigin -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ChannelgetChannel(OpenOption... options) Gets this origin as a Channel, if possible.getFile()Gets this origin as a File, if possible.getInputStream(OpenOption... options) Gets this origin as an InputStream, if possible.getPath()Gets this origin as a Path, if possible.Methods inherited from class AbstractOrigin
get, getByteArray, getByteArray, getChannel, getCharSequence, getOutputStream, getRandomAccessFile, getReader, getWriter, size, toStringMethods inherited from class AbstractSupplier
asThisMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IOSupplier
asSupplier, getUnchecked
-
Constructor Details
-
URIOrigin
Constructs a new instance for the given origin.- Parameters:
origin- The origin, not null.- Throws:
NullPointerException- iforiginisnull.
-
-
Method Details
-
getChannel
Description copied from class:AbstractOriginGets this origin as a Channel, if possible.- Overrides:
getChannelin classAbstractOrigin<URI, AbstractOrigin.URIOrigin>- Parameters:
options- Options specifying how a file-based origin is opened, ignored otherwise.- Returns:
- A new Channel on the origin.
- Throws:
IOException- If an I/O error occurs.- See Also:
-
getFile
Description copied from class:AbstractOriginGets this origin as a File, if possible.- Overrides:
getFilein classAbstractOrigin<URI, AbstractOrigin.URIOrigin>- Returns:
- this origin as a File, if possible.
-
getInputStream
Description copied from class:AbstractOriginGets this origin as an InputStream, if possible.- Overrides:
getInputStreamin classAbstractOrigin<URI, AbstractOrigin.URIOrigin>- Parameters:
options- options specifying how the file is opened- Returns:
- this origin as an InputStream, if possible.
- Throws:
IOException- if an I/O error occurs.
-
getPath
Description copied from class:AbstractOriginGets this origin as a Path, if possible.- Overrides:
getPathin classAbstractOrigin<URI, AbstractOrigin.URIOrigin>- Returns:
- this origin as a Path, if possible.
-