public class ClassPathResource extends BaseResource implements InternalResource, Externalizable
| Constructor and Description |
|---|
ClassPathResource() |
ClassPathResource(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) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
ClassLoader |
getClassLoader() |
Class<?> |
getClazz() |
String |
getEncoding() |
InputStream |
getInputStream()
This implementation opens an InputStream for the given class path resource.
|
long |
getLastModified() |
long |
getLastRead() |
String |
getPath() |
Reader |
getReader() |
URL |
getURL()
This implementation returns a URL for the underlying class path resource.
|
int |
hashCode() |
boolean |
hasURL() |
boolean |
isDirectory() |
Collection<org.kie.api.io.Resource> |
listResources() |
void |
readExternal(ObjectInput in) |
void |
setClassLoader(ClassLoader classLoader) |
protected void |
setLastRead(long lastRead) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
addCategory, getBytes, getCategories, getConfiguration, getDescription, getResourceType, getSourcePath, getTargetPath, setCategories, setConfiguration, setDescription, setResourceType, setSourcePath, setTargetPathclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddCategory, getBytes, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceTypepublic ClassPathResource()
public ClassPathResource(String path)
public ClassPathResource(String path, ClassLoader classLoader)
public ClassPathResource(String path, String encoding, ClassLoader classLoader)
public ClassPathResource(String path, String encoding, Class<?> clazz, ClassLoader classLoader)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class BaseResourceIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class BaseResourceIOExceptionClassNotFoundExceptionpublic InputStream getInputStream() throws IOException
getInputStream in interface org.kie.api.io.ResourceIOExceptionClassLoader.getResourceAsStream(String),
Class.getResourceAsStream(String)public URL getURL() throws IOException
getURL in interface InternalResourceIOExceptionClassLoader.getResource(String),
Class.getResource(String)public boolean hasURL()
hasURL in interface InternalResourcepublic long getLastModified()
getLastModified in interface InternalResourcepublic long getLastRead()
getLastRead in interface InternalResourcepublic String getEncoding()
getEncoding in interface InternalResourcepublic Reader getReader() throws IOException
getReader in interface org.kie.api.io.ResourceIOExceptionpublic boolean isDirectory()
isDirectory in interface InternalResourcepublic Collection<org.kie.api.io.Resource> listResources()
listResources in interface InternalResourcepublic ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
public Class<?> getClazz()
public String getPath()
protected void setLastRead(long lastRead)
public boolean equals(Object object)
equals in class BaseResourcepublic int hashCode()
hashCode in class BaseResourcepublic String toString()
toString in class BaseResourceCopyright © 2001–2018 JBoss by Red Hat. All rights reserved.