Package java.net

Examples of java.net.URISyntaxException


            Address[] recipients = requestMessage.getRecipients(Message.RecipientType.TO);
            if (!ObjectUtils.isEmpty(recipients) && recipients[0] instanceof InternetAddress) {
                return MailTransportUtils.toUri((InternetAddress) recipients[0], requestMessage.getSubject());
            }
            else {
                throw new URISyntaxException("", "Could not determine To header");
            }
        }
        catch (MessagingException ex) {
            throw new URISyntaxException("", ex.getMessage());
        }
    }
View Full Code Here


    public URI getUri() throws URISyntaxException {
        try {
            return JmsTransportUtils.toUri(requestDestination);
        }
        catch (JMSException ex) {
            throw new URISyntaxException("", ex.getMessage());
        }
    }
View Full Code Here

    public URI getUri() throws URISyntaxException {
        try {
            return new URI(postMethod.getURI().toString());
        }
        catch (URIException ex) {
            throw new URISyntaxException("", ex.getMessage());
        }
    }
View Full Code Here

            {
                getInfoFromAddress();
            }
            catch(Exception e)
            {
                URISyntaxException ex = new URISyntaxException(str,"Error parsing address");
                ex.initCause(e);
                throw ex;
            }
        }
        _logger.debug("Based on " + str + " the selected destination syntax is " + _destSyntax);
    }
View Full Code Here

         if (entryURL == null)
            entryURL = new URL(jarURL, getName());
      }
      catch (MalformedURLException e)
      {
         throw new URISyntaxException("Failed to create relative jarURL", e.getMessage());
      }
      return entryURL.toURI();
   }
View Full Code Here

      String scheme = uri.getScheme();
      if (uri.getScheme() == null)
         scheme = JCR_SCHEME;
      if (!scheme.equals(JCR_SCHEME))
         throw new URISyntaxException(scheme, "Only 'jcr' scheme is acceptable!");

      userInfo = uri.getUserInfo();

      repository = uri.getHost();

      workspace = parseWorkpace(uri);

      String fragment = uri.getFragment();
      if (fragment != null)
      {
         if (fragment.startsWith("/"))
            this.path = fragment;
         else
            this.id = new Identifier(uri.getFragment());
      }
      else
         throw new URISyntaxException(fragment, "Neither Path nor Identifier defined!");

   }
View Full Code Here

      String scheme = uri.getScheme();
      if (uri.getScheme() == null)
         scheme = JCR_SCHEME;
      if (!scheme.equals(JCR_SCHEME))
         throw new URISyntaxException(scheme, "Only 'jcr' scheme is acceptable!");

      userInfo = uri.getUserInfo();

      repository = uri.getHost();
      if (repository == null)
         repository = defaultRepository;

      workspace = parseWorkpace(uri);
      if (workspace == null || workspace.length() == 0)
         workspace = defaultWorkspace;

      String fragment = uri.getFragment();
      if (fragment != null)
      {
         if (fragment.startsWith("/"))
            this.path = fragment;
         else
            this.id = new Identifier(uri.getFragment());
      }
      else
         throw new URISyntaxException(fragment, "Neither Path nor Identifier defined!");

   }
View Full Code Here

   {
      if (id != null)
         return new URI(JCR_SCHEME, userInfo, repository, -1, '/' + workspace, null, id.getString());
      else if (path != null)
         return new URI(JCR_SCHEME, userInfo, repository, -1, '/' + workspace, null, path);
      throw new URISyntaxException("", "Path or Idenfifier is not defined!");
   }
View Full Code Here

      String scheme = uri.getScheme();
      if (uri.getScheme() == null)
         scheme = JCR_SCHEME;
      if (!scheme.equals(JCR_SCHEME))
         throw new URISyntaxException(scheme, "Only 'jcr' scheme is acceptable!");

      userInfo = uri.getUserInfo();

      repository = uri.getHost();

      workspace = parseWorkpace(uri);

      String fragment = uri.getFragment();
      if (fragment != null)
      {
         if (fragment.startsWith("/"))
            this.path = fragment;
         else
            this.id = new Identifier(uri.getFragment());
      }
      else
         throw new URISyntaxException(fragment, "Neither Path nor Identifier defined!");

   }
View Full Code Here

      String scheme = uri.getScheme();
      if (uri.getScheme() == null)
         scheme = JCR_SCHEME;
      if (!scheme.equals(JCR_SCHEME))
         throw new URISyntaxException(scheme, "Only 'jcr' scheme is acceptable!");

      userInfo = uri.getUserInfo();

      repository = uri.getHost();
      if (repository == null)
         repository = defaultRepository;

      workspace = parseWorkpace(uri);
      if (workspace == null || workspace.length() == 0)
         workspace = defaultWorkspace;

      String fragment = uri.getFragment();
      if (fragment != null)
      {
         if (fragment.startsWith("/"))
            this.path = fragment;
         else
            this.id = new Identifier(uri.getFragment());
      }
      else
         throw new URISyntaxException(fragment, "Neither Path nor Identifier defined!");

   }
View Full Code Here

TOP

Related Classes of java.net.URISyntaxException

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.