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