Package org.drools.core.io.impl
Class InputStreamResource
- java.lang.Object
-
- org.drools.core.io.impl.BaseResource
-
- org.drools.core.io.impl.InputStreamResource
-
- All Implemented Interfaces:
Externalizable
,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.core.io.impl.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()
String
getEncoding()
InputStream
getInputStream()
Reader
getReader()
URL
getURL()
boolean
hasURL()
boolean
isDirectory()
Collection<org.kie.api.io.Resource>
listResources()
void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.drools.core.io.impl.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.core.io.internal.InternalResource
addCategory, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceType
-
-
-
-
Constructor Detail
-
InputStreamResource
public InputStreamResource()
-
InputStreamResource
public InputStreamResource(InputStream stream)
-
InputStreamResource
public InputStreamResource(InputStream stream, String encoding)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classBaseResource
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classBaseResource
- Throws:
IOException
-
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interfaceInternalResource
- Overrides:
getBytes
in classBaseResource
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfaceorg.kie.api.io.Resource
- Throws:
IOException
-
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interfaceInternalResource
-
getReader
public Reader getReader() throws IOException
- Specified by:
getReader
in interfaceorg.kie.api.io.Resource
- Throws:
IOException
-
getURL
public URL getURL() throws IOException
- Specified by:
getURL
in interfaceInternalResource
- Throws:
IOException
-
hasURL
public boolean hasURL()
- Specified by:
hasURL
in interfaceInternalResource
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfaceInternalResource
-
listResources
public Collection<org.kie.api.io.Resource> listResources()
- Specified by:
listResources
in interfaceInternalResource
-
-