Package org.codehaus.enunciate.rest

Examples of org.codehaus.enunciate.rest.MimeType


    Set<String> allKnownContentTypes = ((EnunciateFreemarkerModel)FreemarkerModel.get()).getContentTypesToIds().keySet();
    String typeValue = mediaType.getType();
    List<String> typeSet = new ArrayList<String>();
    typeSet.add(typeValue);
    try {
      MimeType mimeType = MimeType.parse(typeValue);
      for (String knownType : allKnownContentTypes) {
        try {
          MimeType knownMimeType = MimeType.parse(knownType);
          if (mimeType.isAcceptable(knownMimeType)) {
            typeSet.add(knownType);
          }
        }
        catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.rest.MimeType

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.