Examples of toASCIIString()


Examples of java.net.URI.toASCIIString()

          if (attachment.getLink() != null) {
            strip = true;
            URI link = attachment.getLink();
            String name = URIUtils.getFile(link);
            if (!StringUtils.isSet(name))
              name = link.toASCIIString();

            //TODO Consider Attachment length and type
            link(footer, link.toASCIIString(), name, "attachment");
            footer.append(", ");
          }
View Full Code Here

Examples of java.net.URI.toASCIIString()

            String name = URIUtils.getFile(link);
            if (!StringUtils.isSet(name))
              name = link.toASCIIString();

            //TODO Consider Attachment length and type
            link(footer, link.toASCIIString(), name, "attachment");
            footer.append(", ");
          }
        }

        if (strip)
View Full Code Here

Examples of java.net.URI.toASCIIString()

      {
         return uri == null ? null : uri.toURL();
      }
      catch (MalformedURLException e)
      {
         throw new RuntimeException(String.format("Could not create a URL for %s in %s.%s", uri
                 .toASCIIString(), method.getClass().getName(), method.getName()), e);
      }
   }
}
View Full Code Here

Examples of java.net.URI.toASCIIString()

      @Path("/link-header")
      public Response getWithHeader(@Context UriInfo uri)
      {
         URI subUri = uri.getAbsolutePathBuilder().path("next-link").build();
         Link link = new Link();
         link.setHref(subUri.toASCIIString());
         link.setRelationship("nextLink");
         return Response.noContent().header("Link", link.toString()).build();
      }

      @GET
View Full Code Here

Examples of java.net.URI.toASCIIString()

            return;
        }

        // Prepare the HTTP request.
        HttpRequest request = new DefaultHttpRequest(
                HttpVersion.HTTP_1_1, HttpMethod.GET, uri.toASCIIString());
        request.setHeader(HttpHeaders.Names.HOST, host);
        request.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE);
        request.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);

        // Set some example cookies.
View Full Code Here

Examples of java.net.URI.toASCIIString()

        String method = getMethod();
        ProtocolVersion ver = getProtocolVersion();
        URI uri = getURI();
        String uritext = null;
        if (uri != null) {
            uritext = uri.toASCIIString();
        }
        if (uritext == null || uritext.length() == 0) {
            uritext = "/";
        }
        return new BasicRequestLine(method, uritext, ver);
View Full Code Here

Examples of java.net.URI.toASCIIString()

            try
            {
                URI linkuri = new URI( ret );
                URI relativeURI = baseURI.relativize( linkuri ).normalize();
                ret = relativeURI.toASCIIString();
                if ( ret.startsWith( baseURI.getPath() ) )
                {
                    ret = ret.substring( baseURI.getPath().length() );
                }
View Full Code Here

Examples of java.net.URI.toASCIIString()

            if ( link.startsWith( "/" ) )
            {
                linkuri = baseURI.resolve( linkuri );
            }
            URI relativeURI = baseURI.relativize( linkuri ).normalize();
            ret = relativeURI.toASCIIString();
            if ( ret.startsWith( baseURI.getPath() ) )
            {
                ret = ret.substring( baseURI.getPath().length() );
            }
View Full Code Here

Examples of java.net.URI.toASCIIString()

        if (!RESOURCE_LOADER_AUTHORITY_ABSOLUTE.equals(authority)) {
          path = path.substring(1);
        }
        try {
          final InputSource is = new InputSource(loader.openResource(path));
          is.setSystemId(uri.toASCIIString());
          is.setPublicId(publicId);
          return is;
        } catch (RuntimeException re) {
          // unfortunately XInclude fallback only works with IOException, but openResource() never throws that one
          throw (IOException) (new IOException(re.getMessage()).initCause(re));
View Full Code Here

Examples of java.net.URI.toASCIIString()

            {
                throw new MojoExecutionException( "Unable to load resource information", e );
            }

            m_resourceBundle.put( Resource.SIZE, String.valueOf( bundleFile.length() ) );
            m_resourceBundle.put( Resource.URI, resourceURI.toASCIIString() );
        }
        else
        {
            m_logger.error( "file doesn't exist: " + bundleJar );
            return;
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.