Package java.net

Examples of java.net.MalformedURLException.initCause()


         return new JarContext(fromVFS(root));
      }
      catch(URISyntaxException e)
      {
         MalformedURLException ex = new MalformedURLException("non-URI compliant URL");
         ex.initCause(e);
         throw ex;
      }
   }

   public VFSContext getVFS(URI root) throws IOException
View Full Code Here


         return new FileSystemContext(fromVFS(root));
      }
      catch(URISyntaxException e)
      {
         MalformedURLException ex = new MalformedURLException("non-URI compliant URL");
         ex.initCause(e);
         throw ex;
      }
   }

   public VFSContext getVFS(URI root) throws IOException
View Full Code Here

         return new FileSystemContext(fromVFS(root));
      }
      catch(URISyntaxException e)
      {
         MalformedURLException ex = new MalformedURLException("non-URI compliant URI");
         ex.initCause(e);
         throw ex;
      }
   }
}
View Full Code Here

           
            return ESCAPE_PATTERN.matcher(uriString).replaceAll("%$1");
        } catch (URISyntaxException e) {
            IOException ioe = new MalformedURLException("Couldn't convert '"
                + url.toString() + "' to a valid URI");
            ioe.initCause(e);
            throw ioe;
        }
    }
   
    protected URL normalizeToURL(URL url) throws IOException {
View Full Code Here

           
            return ESCAPE_PATTERN.matcher(uriString).replaceAll("%$1");
        } catch (URISyntaxException e) {
            IOException ioe = new MalformedURLException("Couldn't convert '"
                + url.toString() + "' to a valid URI");
            ioe.initCause(e);
            throw ioe;
        }
    }
   
    protected URL normalizeToURL(URL url) throws IOException {
View Full Code Here

  try {
      uri = new URI(url);
  } catch (URISyntaxException e) {
      MalformedURLException mue =
    new MalformedURLException("URI parsing failure: " + url);
      mue.initCause(e);
      throw mue;
  }
  if (!uri.isAbsolute()) {
      throw new MalformedURLException("no scheme specified: " + url);
  }
View Full Code Here

      try {
    portInt = Integer.parseInt(portString);
      } catch (NumberFormatException ne) {
    MalformedURLException mue = new MalformedURLException(
        "invalid port in authority: " + uri);
    mue.initCause(ne);
    throw mue;
      }
  }
  port = portInt;
  host = authority.substring(0, index);
View Full Code Here

      MessageDigest.getInstance(algorithm);
  } catch (NoSuchAlgorithmException e) {
      MalformedURLException t = new MalformedURLException(
    "Message digest parameter algorithm is not found: " +
    algorithm);
      t.initCause(e);
      throw t;
  }
  String digest = path.substring(equalsIndex + 1);
  int comment = digest.indexOf(',');
  if (comment >= 0) {
View Full Code Here

      expectedDigest = HttpmdUtil.stringDigest(digest);
  } catch (NumberFormatException e) {
      MalformedURLException t = new MalformedURLException(
    "Message digest parameter has invalid format for digest: " +
    digest);
      t.initCause(e);
      throw t;
  }
  try {
      content = new URL(
    "http", url.getHost(), url.getPort(),
View Full Code Here

    (url.getQuery() == null ? "" : url.getQuery()) +
    (url.getRef() == null ? "" : url.getRef()));
  } catch (MalformedURLException e) {
      MalformedURLException t = new MalformedURLException(
    "Problem with content location");
      t.initCause(e);
      throw t;
  }

  delegateConnection = (HttpURLConnection) content.openConnection();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.