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

## org.apache.ivy.util.url
Class BasicURLHandler

    java.lang.Object
      org.apache.ivy.util.url.AbstractURLHandler
          org.apache.ivy.util.url.BasicURLHandler

All Implemented Interfaces:
  URLHandler

    public class BasicURLHandler

extends AbstractURLHandler

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.ivy.util.url.URLHandler
`URLHandler.URLInfo`

Field Summary

Fields inherited from interface org.apache.ivy.util.url.URLHandler
`REQUEST_METHOD_GET, REQUEST_METHOD_HEAD, UNAVAILABLE`

Constructor Summary
`BasicURLHandler()`

Method Summary
`void` | `download(java.net.URL src, java.io.File dest, CopyProgressListener l)`
`URLHandler.URLInfo` | `getURLInfo(java.net.URL url)` Returns the URLInfo of the given url or a `URLHandler.UNAVAILABLE` instance, if the url is not reachable.
`URLHandler.URLInfo` | `getURLInfo(java.net.URL url, int timeout)` never returns null, return UNAVAILABLE when url is not reachable
`java.io.InputStream` | `openStream(java.net.URL url)`
`void` | `upload(java.io.File source, java.net.URL dest, CopyProgressListener l)`

Methods inherited from class org.apache.ivy.util.url.AbstractURLHandler
`getContentLength, getContentLength, getDecodingInputStream, getLastModified, getLastModified, getRequestMethod, isReachable, isReachable, normalizeToString, normalizeToURL, setRequestMethod, validatePutStatusCode`

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

Constructor Detail

### BasicURLHandler

    public BasicURLHandler()

Method Detail

### getURLInfo

    public URLHandler.URLInfo getURLInfo(java.net.URL url)

  Description copied from interface: `URLHandler`
  Returns the URLInfo of the given url or a `URLHandler.UNAVAILABLE` instance, if the url is not reachable.

  Parameters:
    `url` - The url from which information is retrieved.
  Returns:
    The URLInfo extracted from the given url, or `URLHandler.UNAVAILABLE` when the url is not available.

### getURLInfo

    public URLHandler.URLInfo getURLInfo(java.net.URL url,
                                         int timeout)

  Description copied from interface: `URLHandler`
  never returns null, return UNAVAILABLE when url is not reachable

  Parameters:
    `url` - The url from which information is retrieved.
    `timeout` - The timeout in milliseconds.
  Returns:
    The URLInfo extracted from the given url, or `URLHandler.UNAVAILABLE` when the url is not available.

### openStream

    public java.io.InputStream openStream(java.net.URL url)
                                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### download

    public void download(java.net.URL src,
                         java.io.File dest,
                         CopyProgressListener l)
                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### upload

    public void upload(java.io.File source,
                       java.net.URL dest,
                       CopyProgressListener l)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

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