Package com.gengoai.io.resource
Class InputStreamResource
- java.lang.Object
-
- com.gengoai.io.resource.BaseResource
-
- com.gengoai.io.resource.InputStreamResource
-
- All Implemented Interfaces:
NonTraversableResource
,ReadOnlyResource
,Resource
,Serializable
public class InputStreamResource extends BaseResource implements ReadOnlyResource, NonTraversableResource
Resource that wraps anInputStream
- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.gengoai.io.resource.Resource
Resource.Deserializer
-
-
Field Summary
-
Fields inherited from interface com.gengoai.io.resource.Resource
ALL_FILE_PATTERN
-
-
Constructor Summary
Constructors Constructor Description InputStreamResource(InputStream stream)
Instantiates a new Input stream resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
createInputStream()
Create input stream input stream.boolean
exists()
Exists boolean.-
Methods inherited from class com.gengoai.io.resource.BaseResource
asFile, asURI, baseName, canRead, canWrite, compressed, createOutputStream, descriptor, getCharset, inputStream, isCompressed, isDirectory, outputStream, path, setCharset, setCompression, setIsCompressed, toString, uncompressed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.gengoai.io.resource.NonTraversableResource
childIterator, childIterator, getChild, getChildren, getChildren, getChildren, getChildren, getChildren, getParent
-
Methods inherited from interface com.gengoai.io.resource.ReadOnlyResource
append, canRead, canWrite
-
Methods inherited from interface com.gengoai.io.resource.Resource
append, asFile, asPath, asURI, asURL, baseName, compressed, copy, delete, delete, deleteOnExit, descriptor, forEach, getCharset, inputStream, isCompressed, isDirectory, lines, mkdir, mkdirs, outputStream, path, readBytes, reader, readLines, readObject, readToString, setCharset, setCompression, setIsCompressed, uncompressed, write, write, writeObject, writer
-
-
-
-
Constructor Detail
-
InputStreamResource
public InputStreamResource(InputStream stream)
Instantiates a new Input stream resource.- Parameters:
stream
- the input stream to wrap
-
-
Method Detail
-
createInputStream
public InputStream createInputStream() throws IOException
Description copied from class:BaseResource
Create input stream input stream.- Overrides:
createInputStream
in classBaseResource
- Returns:
- the input stream
- Throws:
IOException
- the io exception
-
-