Package io.automatiko.engine.services.io
Class InputStreamResource
- java.lang.Object
-
- io.automatiko.engine.services.io.BaseResource
-
- io.automatiko.engine.services.io.InputStreamResource
-
- All Implemented Interfaces:
io.automatiko.engine.api.io.Resource,InternalResource,Serializable
public class InputStreamResource extends BaseResource implements InternalResource
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class io.automatiko.engine.services.io.BaseResource
bytes
-
-
Constructor Summary
Constructors Constructor Description InputStreamResource()InputStreamResource(InputStream stream)InputStreamResource(InputStream stream, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()StringgetEncoding()InputStreamgetInputStream()ReadergetReader()URLgetURL()booleanhasURL()booleanisDirectory()Collection<io.automatiko.engine.api.io.Resource>listResources()-
Methods inherited from class io.automatiko.engine.services.io.BaseResource
addCategory, equals, getCategories, getConfiguration, getDescription, getResourceType, getSourcePath, getTargetPath, hashCode, setCategories, setConfiguration, setDescription, setResourceType, setSourcePath, setTargetPath, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.automatiko.engine.services.io.InternalResource
addCategory, getCategories, getDescription, getResourceType, setCategories, setDescription, setResourceType
-
-
-
-
Constructor Detail
-
InputStreamResource
public InputStreamResource()
-
InputStreamResource
public InputStreamResource(InputStream stream)
-
InputStreamResource
public InputStreamResource(InputStream stream, String encoding)
-
-
Method Detail
-
getBytes
public byte[] getBytes()
- Specified by:
getBytesin interfaceInternalResource- Overrides:
getBytesin classBaseResource
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceio.automatiko.engine.api.io.Resource- Throws:
IOException
-
getEncoding
public String getEncoding()
- Specified by:
getEncodingin interfaceInternalResource
-
getReader
public Reader getReader() throws IOException
- Specified by:
getReaderin interfaceio.automatiko.engine.api.io.Resource- Throws:
IOException
-
getURL
public URL getURL() throws IOException
- Specified by:
getURLin interfaceInternalResource- Throws:
IOException
-
hasURL
public boolean hasURL()
- Specified by:
hasURLin interfaceInternalResource
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectoryin interfaceInternalResource
-
listResources
public Collection<io.automatiko.engine.api.io.Resource> listResources()
- Specified by:
listResourcesin interfaceInternalResource
-
-