Examples of toURL()


Examples of com.subhajit.common.contenturl.MemoryContent.toURL()

                if (in == null) {
                    return null;
                }
                MemoryContent content = new MemoryContent(StreamUtils
                        .readFully(in));
                return content.toURL();
            } finally {
                if (in != null) {
                    in.close();
                }
            }
View Full Code Here

Examples of com.sun.enterprise.admin.util.HttpConnectorAddress.toURL()

            shouldTryCommandAgain = false;
            try {
                if (logger.isLoggable(Level.FINER)) {
                    logger.log(Level.FINER, "URI: {0}", uriString);
                    logger.log(Level.FINER, "URL: {0}", url.toString());
                    logger.log(Level.FINER, "URL: {0}", url.toURL(uriString).toString());
                    logger.log(Level.FINER, "Password options: {0}", passwordOptions);
                    logger.log(Level.FINER, "Using auth info: User: {0}, Password: {1}",
                            new Object[]{user, ok(password) ? "<non-null>" : "<null>"});
                }
                final AuthenticationInfo authInfo = authenticationInfo();
View Full Code Here

Examples of er.extensions.foundation.ERXMutableURL.toURL()

    try {
      _fetchIndex = 0;

      NSMutableDictionary<String, Object> attributesFromQualifier = new NSMutableDictionary<String, Object>();
      ERXMutableURL url = new ERXMutableURL(urlForQualifier(entity, fetchSpecification.qualifier(), attributesFromQualifier));
      InputStream urlStream = new BufferedInputStream(url.toURL().openStream());
      Document document;
      try {
        document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(urlStream);
      }
      finally {
View Full Code Here

Examples of java.io.File.toURL()

        assert (spec != null);
        final boolean isFile = spec.startsWith("file:");
        try {
            if (isFile) {
                final File file = new File(spec.substring(5));
                return adjustTrailingSlash(file.toURL(), file.isDirectory());
            }
            return new URL(spec);
        } catch (MalformedURLException e) {
            throw new IllegalArgumentException("Could't build URL: " + spec);
        }
View Full Code Here

Examples of java.io.File.toURL()

              try{

                if ( f.exists()){

                  URL  file_url = f.toURL();

                  audio_clip = Applet.newAudioClip( file_url );
                }

              }catch( Throwable  e ){
View Full Code Here

Examples of java.io.File.toURL()

        String sJar = u.toString();
        sJar = sJar.substring(0, sJar.length() - prefix.length() - extension.length());
        URL jarURL = new URL(sJar);

        // User dir overrides app dir which overrides jar file bundles
        URL[] urls = {userBundleFile.toURL(), appBundleFile.toURL(), jarURL};
       
        /* This is debugging code, use it when things go wrong :) The line number
         * is approximate as the input stream is buffered by the reader...
        
        {
View Full Code Here

Examples of java.io.File.toURL()

         * system property allows us to know where the lib directory is independently
         * of the user dir*/
         f = new File(LIB_DIR_SP);
      }

      URL context = f.toURL();
      URL jar = new URL(context, INSTANCE_LIBRARY);
      URLClassLoader ucl1 = new URLClassLoader(new URL[]{jar}, null);

      return ucl1;
   }
View Full Code Here

Examples of java.io.File.toURL()

                                                        File.pathSeparator);
        while (tokenizer.hasMoreTokens()) {
            String path = tokenizer.nextToken();
            try {
                File libFile = new File(path);
                urls.add(libFile.toURL());
            } catch (IOException ioe) {
                // Failing a toCanonicalPath on a file that
                // exists() should be a JVM regression test,
                // therefore we have permission to freak uot
                throw new RuntimeException(ioe.toString());
View Full Code Here

Examples of java.io.File.toURL()

                                                        File.pathSeparator);
        while (tokenizer.hasMoreTokens()) {
            String path = tokenizer.nextToken();
            try {
                File libFile = new File(path);
                urls.add(libFile.toURL());
            } catch (IOException ioe) {
                // Failing a toCanonicalPath on a file that
                // exists() should be a JVM regression test,
                // therefore we have permission to freak uot
                throw new RuntimeException(ioe.toString());
View Full Code Here

Examples of java.io.File.toURL()

    this.baseDir = baseDir;
    File[] subDirs = listComponentDirs();// baseDir.listFiles();
    for (File componentDir : subDirs) {
      File metaFile = new File(componentDir, "meta-inf");
      try {
        URL metaFileUrl = metaFile.toURL();
        if (log.isDebugEnabled()) {
          log.debug("reading: " + metaFileUrl.toString());
        }
        InputStream modelFileInputStream = metaFileUrl.openStream();
        try {
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.