Package org.drools.io
Class ClassPathResource
java.lang.Object
org.drools.io.BaseResource
org.drools.io.ClassPathResource
- All Implemented Interfaces:
Externalizable,Serializable,InternalResource,Resource
Borrowed gratuitously from Spring under ASL2.0.
+
- See Also:
-
Field Summary
Fields inherited from class org.drools.io.BaseResource
bytes -
Constructor Summary
ConstructorsConstructorDescriptionClassPathResource(String path) ClassPathResource(String path, Class<?> clazz) ClassPathResource(String path, ClassLoader classLoader) ClassPathResource(String path, String encoding) ClassPathResource(String path, String encoding, Class<?> clazz) ClassPathResource(String path, String encoding, Class<?> clazz, ClassLoader classLoader) ClassPathResource(String path, String encoding, ClassLoader classLoader) -
Method Summary
Methods inherited from class org.drools.io.BaseResource
addCategory, getBytes, 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, getBytes, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceTypeMethods inherited from interface org.kie.api.io.Resource
getSourcePath, getTargetPath, setSourcePath, setTargetPath
-
Constructor Details
-
ClassPathResource
public ClassPathResource() -
ClassPathResource
-
ClassPathResource
-
ClassPathResource
-
ClassPathResource
-
ClassPathResource
-
ClassPathResource
-
ClassPathResource
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseResource- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseResource- Throws:
IOExceptionClassNotFoundException
-
getInputStream
This implementation opens an InputStream for the given class path resource.- Specified by:
getInputStreamin interfaceResource- Throws:
IOException- See Also:
-
getURL
This implementation returns a URL for the underlying class path resource.- Specified by:
getURLin interfaceInternalResource- Throws:
IOException- See Also:
-
hasURL
public boolean hasURL()- Specified by:
hasURLin interfaceInternalResource
-
getEncoding
- Specified by:
getEncodingin interfaceInternalResource
-
getReader
- Specified by:
getReaderin interfaceResource- Throws:
IOException
-
isDirectory
public boolean isDirectory()- Specified by:
isDirectoryin interfaceInternalResource
-
listResources
- Specified by:
listResourcesin interfaceInternalResource
-
getClazz
-
getPath
-
equals
- Overrides:
equalsin classBaseResource
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseResource
-
toString
- Overrides:
toStringin classBaseResource
-