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, setTargetPath
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addCategory, getBytes, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceType
public 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 Externalizable
writeExternal
in class BaseResource
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BaseResource
IOException
ClassNotFoundException
public InputStream getInputStream() throws IOException
getInputStream
in interface org.kie.api.io.Resource
IOException
ClassLoader.getResourceAsStream(String)
,
Class.getResourceAsStream(String)
public URL getURL() throws IOException
getURL
in interface InternalResource
IOException
ClassLoader.getResource(String)
,
Class.getResource(String)
public boolean hasURL()
hasURL
in interface InternalResource
public long getLastModified()
getLastModified
in interface InternalResource
public long getLastRead()
getLastRead
in interface InternalResource
public String getEncoding()
getEncoding
in interface InternalResource
public Reader getReader() throws IOException
getReader
in interface org.kie.api.io.Resource
IOException
public boolean isDirectory()
isDirectory
in interface InternalResource
public Collection<org.kie.api.io.Resource> listResources()
listResources
in interface InternalResource
public 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 BaseResource
public int hashCode()
hashCode
in class BaseResource
public String toString()
toString
in class BaseResource
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.