|
||||||||||
| 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 |
|---|
addCategory, getCategories, getConfiguration, getDescription, getName, getResourceType, setCategories, 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 |
|---|
addCategory, getCategories, getConfiguration, getDescription, getName, getResourceType, setCategories, setConfiguration, setDescription, setName, setResourceType |
| Constructor Detail |
|---|
public EncodedResource(org.drools.io.Resource resource)
resource - the Resource to hold
public EncodedResource(org.drools.io.Resource resource,
String encoding)
resource - the Resource to holdencoding - the encoding to use for reading from the resource| Method Detail |
|---|
public URL getURL()
throws IOException
getURL in interface InternalResourceIOExceptionpublic boolean hasURL()
hasURL in interface InternalResourcepublic 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.ResourceIOException - if opening the Reader failed
public InputStream getInputStream()
throws IOException
getInputStream in interface org.drools.io.ResourceIOExceptionpublic long getLastModified()
getLastModified in interface InternalResourcepublic long getLastRead()
getLastRead in interface InternalResourcepublic boolean isDirectory()
isDirectory in interface InternalResourcepublic Collection<org.drools.io.Resource> listResources()
listResources in interface InternalResourcepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||