|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.io.impl.BaseResource
org.drools.io.impl.EncodedResource
public class EncodedResource
Constructor Summary | |
---|---|
EncodedResource(org.drools.io.Resource resource)
Create a new EncodedResource for the given Resource, not specifying a specific encoding. |
|
EncodedResource(org.drools.io.Resource resource,
String encoding)
Create a new EncodedResource for the given Resource, using the specified encoding. |
Method Summary | |
---|---|
String |
getEncoding()
Return the encoding to use for reading from the resource, or null if none specified. |
InputStream |
getInputStream()
|
long |
getLastModified()
|
long |
getLastRead()
|
Reader |
getReader()
Open a java.io.Reader for the specified resource,
using the specified encoding (if any). |
org.drools.io.Resource |
getResource()
Return the Resource held. |
URL |
getURL()
|
boolean |
hasURL()
|
boolean |
isDirectory()
|
Collection<org.drools.io.Resource> |
listResources()
|
String |
toString()
|
Methods inherited from class org.drools.io.impl.BaseResource |
---|
getConfiguration, getDescription, getName, getResourceType, setConfiguration, setDescription, setName, setResourceType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.drools.io.internal.InternalResource |
---|
getConfiguration, getDescription, getName, getResourceType, setConfiguration, setDescription, setName, setResourceType |
Constructor Detail |
---|
public EncodedResource(org.drools.io.Resource resource)
resource
- the Resource to holdpublic EncodedResource(org.drools.io.Resource resource, String encoding)
resource
- the Resource to holdencoding
- the encoding to use for reading from the resourceMethod Detail |
---|
public URL getURL() throws IOException
getURL
in interface InternalResource
IOException
public boolean hasURL()
hasURL
in interface InternalResource
public final org.drools.io.Resource getResource()
public final String getEncoding()
null
if none specified.
public Reader getReader() throws IOException
java.io.Reader
for the specified resource,
using the specified encoding (if any).
getReader
in interface org.drools.io.Resource
IOException
- if opening the Reader failedpublic InputStream getInputStream() throws IOException
getInputStream
in interface org.drools.io.Resource
IOException
public long getLastModified()
getLastModified
in interface InternalResource
public long getLastRead()
getLastRead
in interface InternalResource
public boolean isDirectory()
isDirectory
in interface InternalResource
public Collection<org.drools.io.Resource> listResources()
listResources
in interface InternalResource
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |