Package java.net

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


            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

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

            String size = OwlUI.getSize(attachment.getLength());
            if (size != null)
              link(footer, link.toASCIIString(), NLS.bind(Messages.NewsBrowserLabelProvider_NAME_SIZE, StringUtils.htmlEscape(name), size), "attachment"); //$NON-NLS-1$
            else
View Full Code Here

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

            String size = OwlUI.getSize(attachment.getLength());
            if (size != null)
              link(footer, link.toASCIIString(), NLS.bind(Messages.NewsBrowserLabelProvider_NAME_SIZE, StringUtils.htmlEscape(name), size), "attachment"); //$NON-NLS-1$
            else
              link(footer, link.toASCIIString(), StringUtils.htmlEscape(name), "attachment"); //$NON-NLS-1$

            footer.append(", "); //$NON-NLS-1$
          }
View Full Code Here

            String size = OwlUI.getSize(attachment.getLength());
            if (size != null)
              link(footer, link.toASCIIString(), NLS.bind(Messages.NewsBrowserLabelProvider_NAME_SIZE, StringUtils.htmlEscape(name), size), "attachment"); //$NON-NLS-1$
            else
              link(footer, link.toASCIIString(), StringUtils.htmlEscape(name), "attachment"); //$NON-NLS-1$

            footer.append(", "); //$NON-NLS-1$
          }
        }
View Full Code Here

          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

            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

      {
         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

      @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

            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

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.