public class URLSource
extends org.apache.excalibur.source.impl.AbstractSource
implements org.apache.excalibur.source.Source
Modifier and Type | Field and Description |
---|---|
protected long |
m_cachedLastModificationDate |
protected org.apache.excalibur.source.SourceValidity |
m_cachedValidity
the prev returned SourceValidity
|
protected java.net.URLConnection |
m_connection
The connection for a real URL
|
protected java.lang.String |
m_encoding
The encoding of the
SourceParameters |
protected boolean |
m_exists
Does this source exist ?
|
protected boolean |
m_isPost
Is this a post?
|
protected java.lang.String |
m_mimeType
The content type (if known)
|
protected org.apache.excalibur.source.SourceParameters |
m_parameters
The
SourceParameters used for a post |
protected java.net.URL |
m_url
The URL of the source
|
Constructor and Description |
---|
URLSource()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Does this source exist ?
|
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. |
java.lang.String |
getMimeType()
The mime-type of the content described by this object.
|
protected java.lang.String |
getUserInfo()
The decoded userinfo for this source.
|
org.apache.excalibur.source.SourceValidity |
getValidity()
Get the Validity object.
|
void |
init(java.net.URL url,
java.util.Map parameters)
Initialize a new object from a
URL . |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters par) |
void |
refresh()
Refresh this object and update the last modified date
and content length.
|
checkInfos, getContentLength, getLastModified, getScheme, getURI, setContentLength, setLastModified, setScheme, setSystemId
protected java.net.URL m_url
protected java.net.URLConnection m_connection
protected org.apache.excalibur.source.SourceParameters m_parameters
SourceParameters
used for a postprotected java.lang.String m_encoding
SourceParameters
protected boolean m_isPost
protected boolean m_exists
protected org.apache.excalibur.source.SourceValidity m_cachedValidity
protected long m_cachedLastModificationDate
protected java.lang.String m_mimeType
public void init(java.net.URL url, java.util.Map parameters) throws java.io.IOException
URL
.parameters
- This is optionaljava.io.IOException
public void parameterize(org.apache.avalon.framework.parameters.Parameters par)
protected void getInfos()
getInfos
in class org.apache.excalibur.source.impl.AbstractSource
public boolean exists()
exists
in interface org.apache.excalibur.source.Source
public java.io.InputStream getInputStream() throws java.io.IOException, org.apache.excalibur.source.SourceException
InputStream
object to read from the source.
The returned stream must be closed by the calling code.getInputStream
in interface org.apache.excalibur.source.Source
getInputStream
in class org.apache.excalibur.source.impl.AbstractSource
org.apache.excalibur.source.SourceException
- if file not found or
HTTP location does not exist.java.io.IOException
- if I/O error occured.public org.apache.excalibur.source.SourceValidity getValidity()
null
is returned.getValidity
in interface org.apache.excalibur.source.Source
getValidity
in class org.apache.excalibur.source.impl.AbstractSource
public void refresh()
refresh
in interface org.apache.excalibur.source.Source
refresh
in class org.apache.excalibur.source.impl.AbstractSource
public java.lang.String getMimeType()
getMimeType
in interface org.apache.excalibur.source.Source
getMimeType
in class org.apache.excalibur.source.impl.AbstractSource
protected java.lang.String getUserInfo()
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.