Examples of ContentType


Examples of com.sun.xml.ws.api.pipe.ContentType

     * Since request reached to JSON codec endpoint send response as JSON.
     **/
    /*
     * Read and remove the forced content type don't end in response body part.
     */
    ContentType contentType = (ContentType) invocationProperties.remove(JSONCodec.FORCED_RESPONSE_CONTENT_TYPE);
    /*
     * DEFAULT JSON output
     */
    final HashMap<String, Object>   responseJSONMap = new HashMap<String, Object>();
    final WSJSONWriter         writer       = new WSJSONWriter(output, responseJSONMap, this.codec.getCustomSerializer());
View Full Code Here

Examples of com.sun.xml.ws.encoding.ContentType

            if (in == null) {
                return Messages.createEmpty(SOAPVersion.SOAP_11);
            }

            if (ct != null) {
                final ContentType contentType = new ContentType(ct);
                final int contentTypeId = identifyContentType(contentType);
                if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                    data = new XMLMultiPart(ct, in, binding);
                } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                    data = new XmlContent(ct, in, binding);
View Full Code Here

Examples of com.theoryinpractise.halbuilder.impl.ContentType

    private NamespaceManager namespaceManager = new NamespaceManager();
    private List<Link> links = Lists.newArrayList();
    private Set<URI> flags = Sets.newHashSet();

    public DefaultRepresentationFactory withRenderer(String contentType, Class<? extends RepresentationWriter<String>> rendererClass) {
        contentRenderers.put(new ContentType(contentType), rendererClass);
        return this;
    }
View Full Code Here

Examples of com.vtence.molecule.http.ContentType

    public Iterable<Cookie> cookies() {
        return new ArrayList<Cookie>(cookies.values());
    }

    public Charset charset() {
        ContentType contentType = ContentType.of(this);
        if (contentType == null || contentType.charset() == null) {
            return Charsets.ISO_8859_1;
        }
        return contentType.charset();
    }
View Full Code Here

Examples of edu.uga.galileo.voci.model.ContentType

    if ((request.getParameterValues("blurbMe") != null)
        && (request.getSession().getAttribute("user") != null)) {
      String[] newFieldsToBlurbFrom = request
          .getParameterValues("blurbMe");

      ContentType contentType = ContentType.valueOf(Integer
          .parseInt(request.getParameter("ctype")));
      try {
        int projectId = (new ProjectManager()).getProjectID(command
            .getProject());
        for (int m = 0; m < newFieldsToBlurbFrom.length; m++) {
          // strip out the starting "s:" from the advanced search
          // pages
          newFieldsToBlurbFrom[m] = newFieldsToBlurbFrom[m]
              .substring(2);
          // then fill in the rest of the info that the page expects
          newFieldsToBlurbFrom[m] = newFieldsToBlurbFrom[m]
              + " ("
              + (new MetadataManager())
                  .getDisplayNameByElementAndQualifier(
                      projectId, contentType.getValue(),
                      newFieldsToBlurbFrom[m]) + ")";
        }
      } catch (NoSuchProjectException e) {
        Logger.warn("Couldn't get project ID for handle '"
            + command.getProject() + "'");
      }

      (new UserManager()).setUserPreference((User) request.getSession()
          .getAttribute("user"), command.getProject() + "-"
          + contentType.toString().toLowerCase() + "BlurbFields",
          StringUtils.join(newFieldsToBlurbFrom, "|"));
    }
  }
View Full Code Here

Examples of gov.nist.javax.sip.header.ContentType

                ContentLengthHeader.NAME.length()  < 1300) {
           
            /*
             * Check to see we are within one UDP packet.
             */
            ContentTypeHeader cth = new ContentType("message", "sipfrag");
            buf.append("\r\n" + cth.toString());
            ContentLength clengthHeader = new ContentLength(clength);
            buf.append("\r\n" + clengthHeader.toString());
            buf.append("\r\n\r\n" + badReq);
        } else {
            ContentLength clengthHeader = new ContentLength(0);
View Full Code Here

Examples of javax.mail.internet.ContentType

                // Extract the charset encoding from the configured content type and
                // set the CHARACTER_SET_ENCODING property as e.g. SOAPBuilder relies on this.
                String charSetEnc = null;
                try {
                    if (contentType != null) {
                        charSetEnc = new ContentType(contentType).getParameter("charset");
                    }
                } catch (ParseException ex) {
                    // ignore
                }
                msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
View Full Code Here

Examples of javax.mail.internet.ContentType

      // this should be exactly two parts, one the content, the other the
      // signature.
      for (int i = 0; i < mm.getCount(); i++) {
        // return the first one found.
        MimeBodyPart mbp = (MimeBodyPart) mm.getBodyPart(i);
        ContentType ct = new ContentType(mbp.getContentType());
        if (! ct.getSubType().toLowerCase().endsWith("signature")) {
          return mbp;
        }
      }
    } /*
    else if(content instanceof String){
View Full Code Here

Examples of javax.mail.internet.ContentType

        return type;
    }

    public void setType(String type) {
        try {
            new ContentType(type);
            if (log.isDebugEnabled()) {
                log.debug("Content type :" + type);
            }
            this.type = type;
        } catch (ParseException e) {
View Full Code Here

Examples of javax.mail.internet.ContentType

                // Extract the charset encoding from the configured content type and
                // set the CHARACTER_SET_ENCODING property as e.g. SOAPBuilder relies on this.
                String charSetEnc = null;
                try {
                    if (contentType != null) {
                        charSetEnc = new ContentType(contentType).getParameter("charset");
                    }
                } catch (ParseException ex) {
                    // ignore
                }
                msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
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.