|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.components.source.impl.CocoonToAvalonSource
public final class CocoonToAvalonSource
This source objects wraps an obsolete Cocoon Source object to avoid recoding existing source objects.
| Field Summary | |
|---|---|
protected String |
protocol
The protocol |
protected Source |
source
The real source |
| Constructor Summary | |
|---|---|
CocoonToAvalonSource(String location,
Source source)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
exists()
|
long |
getContentLength()
Return the content length of the content or -1 if the length is unknown |
InputStream |
getInputStream()
Return an InputStream object to read from the source. |
long |
getLastModified()
Get the last modification date of the source or 0 if it is not possible to determine the date. |
String |
getMimeType()
The mime-type of the content described by this object. |
String |
getParameter(String name)
Get the value of a parameter. |
long |
getParameterAsLong(String name)
Get the value of a parameter. |
Iterator |
getParameterNames()
Get parameter names Using this it is possible to get custom information provided by the source implementation, like an expires date, HTTP headers etc. |
String |
getScheme()
Return the protocol identifier. |
String |
getURI()
Return the unique identifer for this source |
SourceValidity |
getValidity()
Get the Validity object. |
void |
recycle()
Recyclable |
void |
refresh()
Refresh this object and update the last modified date and content length. |
void |
toSAX(ContentHandler contentHandler)
Stream content to the content handler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Source source
protected String protocol
| Constructor Detail |
|---|
public CocoonToAvalonSource(String location,
Source source)
| Method Detail |
|---|
public String getScheme()
getScheme in interface Sourcepublic boolean exists()
exists in interface SourceSource.exists()
public InputStream getInputStream()
throws IOException,
SourceException
InputStream object to read from the source.
getInputStream in interface SourceIOException
SourceExceptionpublic String getURI()
getURI in interface Sourcepublic SourceValidity getValidity()
null is returned.
getValidity in interface Sourcepublic void refresh()
refresh in interface Sourcepublic String getMimeType()
getMimeType in interface Source
public void toSAX(ContentHandler contentHandler)
throws SAXException
toSAX in interface XMLizableSAXExceptionpublic void recycle()
recycle in interface Recyclablepublic long getContentLength()
getContentLength in interface Sourcepublic long getLastModified()
getLastModified in interface Sourcepublic String getParameter(String name)
public long getParameterAsLong(String name)
public Iterator getParameterNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||