public class URLSource
extends org.apache.excalibur.source.impl.AbstractSource
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.excalibur.source.SourceParameters |
requestProperties
The
SourceParameters used in the url connection request properties |
| Constructor and Description |
|---|
URLSource(java.net.URL url)
Construct a new object
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRequestProperties() |
boolean |
exists() |
long |
getContentLength()
Get the content length of the source or -1 if it
is not possible to determine the length.
|
protected void |
getInfos()
Get the last modification date and content length of the source.
|
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
|
protected boolean |
isHTMLContent() |
void |
recycle() |
void |
refresh()
Refresh this object and update the last modified date
and content length.
|
void |
setPostParameters(org.apache.excalibur.source.SourceParameters pars)
Set the post parameters
|
void |
setRequestProperties(org.apache.excalibur.source.SourceParameters pars)
Set the request parameters
|
java.lang.String |
toSAX(java.lang.Object toSaxObject) |
protected org.apache.excalibur.source.SourceParameters requestProperties
SourceParameters used in the url connection request propertiespublic URLSource(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionpublic boolean exists()
protected boolean isHTMLContent()
protected void getInfos()
getInfos in class org.apache.excalibur.source.impl.AbstractSourcepublic long getLastModified()
getLastModified in interface org.apache.excalibur.source.SourcegetLastModified in class org.apache.excalibur.source.impl.AbstractSourcepublic long getContentLength()
getContentLength in interface org.apache.excalibur.source.SourcegetContentLength in class org.apache.excalibur.source.impl.AbstractSourcepublic java.io.InputStream getInputStream()
throws java.io.IOException,
org.apache.excalibur.source.SourceException
InputStream object to read from the source.getInputStream in interface org.apache.excalibur.source.SourcegetInputStream in class org.apache.excalibur.source.impl.AbstractSourceorg.apache.cocoon.ResourceNotFoundException - if file not found or
HTTP location does not exist.java.io.IOException - if I/O error occured.org.apache.excalibur.source.SourceExceptionpublic java.lang.String getSystemId()
public void refresh()
refresh in interface org.apache.excalibur.source.Sourcerefresh in class org.apache.excalibur.source.impl.AbstractSourcepublic void recycle()
public void setPostParameters(org.apache.excalibur.source.SourceParameters pars)
public void setRequestProperties(org.apache.excalibur.source.SourceParameters pars)
protected void addRequestProperties()
public java.lang.String toSAX(java.lang.Object toSaxObject)
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.