Package org.drools.io
Class InputStreamResource
- java.lang.Object
-
- org.drools.io.BaseResource
-
- org.drools.io.InputStreamResource
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,InternalResource,org.kie.api.io.Resource
public class InputStreamResource extends BaseResource implements InternalResource
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.drools.io.BaseResource
bytes
-
-
Constructor Summary
Constructors Constructor Description InputStreamResource()InputStreamResource(java.io.InputStream stream)InputStreamResource(java.io.InputStream stream, java.lang.String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()java.lang.StringgetEncoding()java.io.InputStreamgetInputStream()java.io.ReadergetReader()java.net.URLgetURL()booleanhasURL()booleanisDirectory()java.util.Collection<org.kie.api.io.Resource>listResources()voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class org.drools.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 org.drools.io.InternalResource
addCategory, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceType
-
-
-
-
Method Detail
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classBaseResource- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classBaseResource- Throws:
java.io.IOException
-
getBytes
public byte[] getBytes()
- Specified by:
getBytesin interfaceInternalResource- Overrides:
getBytesin classBaseResource
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Specified by:
getInputStreamin interfaceorg.kie.api.io.Resource- Throws:
java.io.IOException
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncodingin interfaceInternalResource
-
getReader
public java.io.Reader getReader() throws java.io.IOException- Specified by:
getReaderin interfaceorg.kie.api.io.Resource- Throws:
java.io.IOException
-
getURL
public java.net.URL getURL() throws java.io.IOException- Specified by:
getURLin interfaceInternalResource- Throws:
java.io.IOException
-
hasURL
public boolean hasURL()
- Specified by:
hasURLin interfaceInternalResource
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectoryin interfaceInternalResource
-
listResources
public java.util.Collection<org.kie.api.io.Resource> listResources()
- Specified by:
listResourcesin interfaceInternalResource
-
-