Class HTTPURIHandler

  • All Implemented Interfaces:
    URIHandler

    public class HTTPURIHandler
    extends URIHandlerImpl
    A URI handler that handles HTTP connections with connection timeouts and read timeouts. The default timeouts are 10 seconds, they can be set interactively on an instance of the HTTPURIHandler, and default values can be overridden setting the org.geotools.xsd.http.connection.timeout and org.geotools.xsd.http.read.timeout system variables.
    Author:
    Andrea Aime - GeoSolutions
    • Constructor Detail

      • HTTPURIHandler

        public HTTPURIHandler()
    • Method Detail

      • canHandle

        public boolean canHandle​(URI uri)
        Specified by:
        canHandle in interface URIHandler
        Overrides:
        canHandle in class URIHandlerImpl
      • createInputStream

        public InputStream createInputStream​(URI uri,
                                             Map<?,​?> options)
                                      throws IOException
        Creates an input stream for the URI, assuming it's a URL, and returns it.
        Specified by:
        createInputStream in interface URIHandler
        Overrides:
        createInputStream in class URIHandlerImpl
        Returns:
        an open input stream.
        Throws:
        IOException - if there is a problem obtaining an open input stream.
      • getConnectionTimeout

        public int getConnectionTimeout()
        The current connection timeout
      • getReadTimeout

        public int getReadTimeout()
        The current read timeout