Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.util.apache.cocoon.components.source
Class URLSource

    java.lang.Object
      org.apache.excalibur.source.impl.AbstractSource
          fr.gouv.culture.util.apache.cocoon.components.source.URLSource

All Implemented Interfaces:
  org.apache.excalibur.source.Source

public class URLSource
extends org.apache.excalibur.source.impl.AbstractSource

Description of a source which is described by an URL.

Version:
  CVS $Id: URLSource.java,v 1.6 2004/06/17 10:45:50 jlecren Exp $
Author:
  Carsten Ziegeler, Rasik Pandey

Field Summary
`protected org.apache.excalibur.source.SourceParameters` | `requestProperties` The `SourceParameters` used in the url connection request properties

Constructor Summary
`URLSource(java.net.URL url)` Construct a new object

Method Summary
`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)`

Methods inherited from class org.apache.excalibur.source.impl.AbstractSource
`checkInfos, getMimeType, getScheme, getURI, getValidity, setContentLength, setLastModified, setScheme, setSystemId`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### requestProperties

    protected org.apache.excalibur.source.SourceParameters requestProperties

  The `SourceParameters` used in the url connection request properties

Constructor Detail

### URLSource

    public URLSource(java.net.URL url)
              throws java.io.IOException

  Construct a new object

Method Detail

### exists

    public boolean exists()

### isHTMLContent

    protected boolean isHTMLContent()

### getInfos

    protected void getInfos()

  Get the last modification date and content length of the source. Any exceptions are ignored.

### getLastModified

    public long getLastModified()

  Get the last modification date of the source or 0 if it is not possible to determine the date.

### getContentLength

    public long getContentLength()

  Get the content length of the source or -1 if it is not possible to determine the length.

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException,
                                              org.apache.excalibur.source.SourceException

  Return an `InputStream` object to read from the source.

  Throws:
    `org.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.SourceException`

### getSystemId

    public java.lang.String getSystemId()

  Return the unique identifer for this source

### refresh

    public void refresh()

  Refresh this object and update the last modified date and content length.

### recycle

    public void recycle()

### setPostParameters

    public void setPostParameters(org.apache.excalibur.source.SourceParameters pars)

  Set the post parameters

### setRequestProperties

    public void setRequestProperties(org.apache.excalibur.source.SourceParameters pars)

  Set the request parameters

### addRequestProperties

    protected void addRequestProperties()

### toSAX

    public java.lang.String toSAX(java.lang.Object toSaxObject)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.