Package org.jboss.portal.common.net.media

Examples of org.jboss.portal.common.net.media.ContentType


      MediaType mediaType = null;
     
      String contentTypeString = getContentType();
      if (contentTypeString != null)
      {
         ContentType contentType = ContentType.create(contentTypeString);
         mediaType = contentType.getMediaType();
         for (Parameter parameter : contentType.getParameters())
         {
            if (!parameter.getName().trim().toLowerCase().equals("charset"))
            {
               parameters.add(parameter);
            }
         }
      }
      else
      {
         // Default to "text/html"
         mediaType = MediaType.TEXT_HTML;
      }
      parameters.add(new Parameter("charset", s));
     
      setContentType(new ContentType(mediaType, parameters).getValue());
   }
View Full Code Here


         queryParameters = Collections.emptyMap();
      }

      if (request.getContentType() != null)
      {
         ContentType contentType = ContentType.create(request.getContentType());
         mediaType = contentType.getMediaType();
      }
      else
      {
         mediaType = null;
      }
View Full Code Here

TOP

Related Classes of org.jboss.portal.common.net.media.ContentType

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.