Interface URLHelper

  • All Known Implementing Classes:
    FTPHelper, HTTPHelper, RemoteURLHelper

    public interface URLHelper
    Interface defining a helper class for dealing with URL resources. The purpose of this class is to provide the flexibility to use alternative http implementations, for example Apache HTTPClient, and secondly to provide a hook for clients to inject custom headers, for example oAuth tokens, into the requests. An instance of URLHelper is created for a URL (there is a 1-1 relation between a URL and HRLHelper).
    See Also:
    HTTPHelper, FTPHelper
    • Method Detail

      • getUrl

        URL getUrl()
        Returns:
        URL of the associated resource
      • getContentLength

        long getContentLength()
                       throws IOException
        Returns:
        content length of the resource, or -1 if not available
        Throws:
        IOException
      • openInputStreamForRange

        InputStream openInputStreamForRange​(long start,
                                            long end)
                                     throws IOException
        Open an InputStream to stream a slice (range) of the resource. May throw an OperationUnsupportedException
        Parameters:
        start -
        end -
        Returns:
        Throws:
        IOException