Class JavaScriptURLConnection


  • public class JavaScriptURLConnection
    extends java.net.URLConnection
    A URLConnection for supporting JavaScript URLs.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String content_
      The JavaScript code.
      static java.lang.String JAVASCRIPT_PREFIX
      The JavaScript "URL" prefix.
      • Fields inherited from class java.net.URLConnection

        allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaScriptURLConnection​(java.net.URL newUrl)
      Creates an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connect()
      This method does nothing in this implementation but is required to be implemented.
      java.io.InputStream getInputStream()
      Returns the input stream - in this case the content of the URL.
      • Methods inherited from class java.net.URLConnection

        addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • JAVASCRIPT_PREFIX

        public static final java.lang.String JAVASCRIPT_PREFIX
        The JavaScript "URL" prefix.
        See Also:
        Constant Field Values
      • content_

        private final java.lang.String content_
        The JavaScript code.
    • Constructor Detail

      • JavaScriptURLConnection

        public JavaScriptURLConnection​(java.net.URL newUrl)
        Creates an instance.
        Parameters:
        newUrl - the JavaScript URL
    • Method Detail

      • connect

        public void connect()
        This method does nothing in this implementation but is required to be implemented.
        Specified by:
        connect in class java.net.URLConnection
      • getInputStream

        public java.io.InputStream getInputStream()
        Returns the input stream - in this case the content of the URL.
        Overrides:
        getInputStream in class java.net.URLConnection
        Returns:
        the input stream