|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.cocoon.components.source.URLSource
Description of a source which is described by an URL.
Field Summary | |
static char[] |
alphabet
|
Constructor Summary | |
URLSource(java.net.URL url,
org.apache.avalon.framework.component.ComponentManager manager)
Construct a new object |
Method Summary | |
static java.lang.String |
encodeBASE64(byte[] octetString)
BASE 64 encoding. |
static java.lang.String |
encodeBASE64(java.lang.String s)
BASE 64 encoding. |
long |
getContentLength()
Get the content length of the source or -1 if it is not possible to determine the length. |
org.xml.sax.InputSource |
getInputSource()
Return a new InputSource object |
java.io.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. |
java.lang.String |
getSystemId()
Return the unique identifer for this source |
void |
recycle()
|
void |
refresh()
Refresh this object and update the last modified date and content length. |
void |
toSAX(org.xml.sax.ContentHandler handler)
Stream content to a content handler or to an XMLConsumer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char[] alphabet
Constructor Detail |
public URLSource(java.net.URL url, org.apache.avalon.framework.component.ComponentManager manager) throws java.io.IOException
Method Detail |
public long getLastModified()
getLastModified
in interface Source
public long getContentLength()
getContentLength
in interface Source
public java.io.InputStream getInputStream() throws java.io.IOException, ProcessingException
InputStream
object to read from the source.getInputStream
in interface Source
ResourceNotFoundException
- if file not found or
HTTP location does not exist.java.io.IOException
- if I/O error occured.public java.lang.String getSystemId()
getSystemId
in interface Source
public void refresh()
refresh
in interface ModifiableSource
public org.xml.sax.InputSource getInputSource() throws java.io.IOException, ProcessingException
InputSource
objectgetInputSource
in interface Source
ResourceNotFoundException
- if file not found or
HTTP location does not exist.java.io.IOException
- if I/O error occured.public static java.lang.String encodeBASE64(java.lang.String s)
public static java.lang.String encodeBASE64(byte[] octetString)
public void toSAX(org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXException, ProcessingException
toSAX
in interface XMLizable
ResourceNotFoundException
- if file not found or
HTTP location does not exist.org.xml.sax.SAXException
- if failed to parse source document.public void recycle()
recycle
in interface org.apache.avalon.excalibur.pool.Recyclable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |