Package java.net

Class ContentHandler

    • Constructor Detail

      • ContentHandler

        public ContentHandler()
    • Method Detail

      • getContent

        public abstract Object getContent​(URLConnection uConn)
                                   throws IOException
        Returns the object pointed by the specified URL connection uConn.
        Parameters:
        uConn - URL connection that points to the desired object.
        Returns:
        object referred by uConn.
        Throws:
        IOException - if an IO error occurs during the retrieval of the object
      • getContent

        public Object getContent​(URLConnection uConn,
                                 Class[] types)
                          throws IOException
        Returns the object pointed by the specified URL connection uConn.
        Parameters:
        uConn - URL connection that points to the desired object.
        types - list of acceptable content types.
        Returns:
        resource object pointed by this URL or null if the content doesn't match one of the specified content types.
        Throws:
        IOException - if an error occurred while obtaining the content.