Package org.drools.io
Class ByteArrayResource
java.lang.Object
org.drools.io.BaseResource
org.drools.io.ByteArrayResource
- All Implemented Interfaces:
Externalizable,Serializable,InternalResource,Resource
- See Also:
-
Field Summary
Fields inherited from class org.drools.io.BaseResource
bytes -
Constructor Summary
ConstructorsConstructorDescriptionByteArrayResource(byte[] bytes) ByteArrayResource(byte[] bytes, String encoding) -
Method Summary
Methods inherited from class org.drools.io.BaseResource
addCategory, getCategories, getConfiguration, getDescription, getResourceType, getSourcePath, getTargetPath, setCategories, setConfiguration, setDescription, setResourceType, setSourcePath, setTargetPathMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.io.InternalResource
addCategory, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceTypeMethods inherited from interface org.kie.api.io.Resource
getSourcePath, getTargetPath, setSourcePath, setTargetPath
-
Constructor Details
-
ByteArrayResource
public ByteArrayResource() -
ByteArrayResource
public ByteArrayResource(byte[] bytes) -
ByteArrayResource
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseResource- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseResource- Throws:
IOException
-
getEncoding
- Specified by:
getEncodingin interfaceInternalResource
-
getInputStream
- Specified by:
getInputStreamin interfaceResource- Throws:
IOException
-
getReader
- Specified by:
getReaderin interfaceResource- Throws:
IOException
-
getBytes
public byte[] getBytes()- Specified by:
getBytesin interfaceInternalResource- Overrides:
getBytesin classBaseResource
-
hasURL
public boolean hasURL()- Specified by:
hasURLin interfaceInternalResource
-
getURL
- Specified by:
getURLin interfaceInternalResource- Throws:
IOException
-
isDirectory
public boolean isDirectory()- Specified by:
isDirectoryin interfaceInternalResource
-
listResources
- Specified by:
listResourcesin interfaceInternalResource
-
equals
- Overrides:
equalsin classBaseResource
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseResource
-
toString
- Overrides:
toStringin classBaseResource
-