Package java.net

Examples of java.net.MalformedURLException.initCause()


           
            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


             * Occurs only if the URL is not compliant with RFC 2396. Otherwise every URL
             * should succeed, so a failure can actually be considered as a malformed URL.
             */
            final MalformedURLException e = new MalformedURLException(Exceptions.formatChainedMessages(
                    null, Errors.format(Errors.Keys.IllegalArgumentValue_2, "URL", path), cause));
            e.initCause(cause);
            throw e;
        }
    }

    /**
 
View Full Code Here

         return new JarContext(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 JarContext(root.toURL());
      }
      catch(URISyntaxException e)
      {
         MalformedURLException ex = new MalformedURLException("non-URI compliant URL");
         ex.initCause(e);
         throw ex;
      }
   }
}
View Full Code Here

         return new FileSystemContext(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

        } else if (ResourceUtils.isUrl(uri)) {
            try {
                resource = new UrlResource(ResourceUtils.getURL(uri));
            } catch (FileNotFoundException e) {
                MalformedURLException malformedURLException = new MalformedURLException(uri);
                malformedURLException.initCause(e);
                throw  malformedURLException;
            }
        } else {
            resource = new ClassPathResource(uri);
        }
View Full Code Here

        URI uri;
        try {
            uri = URISupport.removeQuery(location);
        } catch (URISyntaxException e) {
            MalformedURLException cause = new MalformedURLException("Error removing query on " + location);
            cause.initCause(e);
            throw cause;
        }
        return new HttpClientTransport(textWireFormat, uri);
    }
View Full Code Here

        URI uri;
        try {
            uri = URISupport.removeQuery(location);
        } catch (URISyntaxException e) {
            MalformedURLException cause = new MalformedURLException("Error removing query on " + location);
            cause.initCause(e);
            throw cause;
        }
        return new HttpsClientTransport(asTextWireFormat(wf), uri);
    }
}
View Full Code Here

/* 51 */       return new JarContext(fromVFS(root));
/*    */     }
/*    */     catch (URISyntaxException e)
/*    */     {
/* 55 */       ex = new MalformedURLException("non-URI compliant URL");
/* 56 */       ex.initCause(e);
/* 57 */     }throw ex;
/*    */   }
/*    */
/*    */   public VFSContext getVFS(URI root)
/*    */     throws IOException
View Full Code Here

/* 51 */       return new FileSystemContext(fromVFS(root));
/*    */     }
/*    */     catch (URISyntaxException e)
/*    */     {
/* 55 */       ex = new MalformedURLException("non-URI compliant URL");
/* 56 */       ex.initCause(e);
/* 57 */     }throw ex;
/*    */   }
/*    */
/*    */   public VFSContext getVFS(URI root) throws IOException
/*    */   {
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.