Package java.net

Examples of java.net.URLStreamHandler


            return new WarURLStreamHandler();
        }

        // Application handlers
        for (URLStreamHandlerFactory factory : userFactories) {
            URLStreamHandler handler =
                factory.createURLStreamHandler(protocol);
            if (handler != null) {
                return handler;
            }
        }
View Full Code Here


      this.list = list;
   }

   public URLStreamHandler createURLStreamHandler(String protocol)
   {
      URLStreamHandler result = null;
      for (URLStreamHandlerFactory factory : list)
      {
        
         result = factory.createURLStreamHandler(protocol);
         if (result != null) return result;
View Full Code Here

        registry.put(protocol, handler);
    }

    public URLStreamHandler createURLStreamHandler(String protocol)
    {
        URLStreamHandler handler = (URLStreamHandler) registry.get(protocol);
        if (handler == null)
        {
            handler = this.defaultHandlerCreateStrategy(protocol);
        }
        return handler;
View Full Code Here

            packagePrefixList += "|sun.net.www.protocol";
        }

        StringTokenizer tokenizer = new StringTokenizer(packagePrefixList, "|");

        URLStreamHandler handler = null;
        while (handler == null && tokenizer.hasMoreTokens())
        {
            String packagePrefix = tokenizer.nextToken().trim();
            String className = packagePrefix + "." + protocol + ".Handler";
            try
View Full Code Here

      }
  }
  if(phldrC == null) {
      phldrC = DummyStreamHandler.class;
  }
  URLStreamHandler handler = null;
  try {
      handler = (URLStreamHandler)phldrC.newInstance();
  } catch(Exception ex) {
  }
  return handler;
View Full Code Here

        if (debug >= 1)
            log("addRepository(" + repository + ")");

        // Add this repository to our underlying class loader
        try {
            URLStreamHandler streamHandler = null;
            String protocol = parseProtocol(repository);
            if (factory != null)
                streamHandler = factory.createURLStreamHandler(protocol);
            URL url = new URL(null, repository, streamHandler);
            super.addURL(url);
View Full Code Here

     * @exception IllegalArgumentException if the manifest of a JAR file
     *  cannot be processed correctly
     */
    protected void addRepositoryInternal(String repository) {

        URLStreamHandler streamHandler = null;
        String protocol = parseProtocol(repository);
        if (factory != null)
            streamHandler = factory.createURLStreamHandler(protocol);

        // Validate the manifest of a JAR file repository
View Full Code Here

     * @param factory Handler factory to use to generate the URLs
     */
    protected static URL[] convert(String input[],
                                   URLStreamHandlerFactory factory) {

        URLStreamHandler streamHandler = null;

        URL url[] = new URL[input.length];
        for (int i = 0; i < url.length; i++) {
            try {
                String protocol = parseProtocol(input[i]);
View Full Code Here

    public URLStreamHandler createURLStreamHandler(String protocol)
    {
        LOGGER.entering(CLASS_NAME, "createURLStreamHandler", protocol);

        URLStreamHandler handler = null;
        if (SentinelURLStreamHandler.TEST_PROTOCOL.equals(protocol))
        {
            handler = new SentinelURLStreamHandler();
        }
View Full Code Here

                prefixList += SUN_PREFIX;
                return prefixList;
            }
        });

        URLStreamHandler handler = null;

        for (String packagePrefix : packagePrefixList.split("\\|"))
        {
            packagePrefix = packagePrefix.trim();
View Full Code Here

TOP

Related Classes of java.net.URLStreamHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.