Class MessageUtils


  • public final class MessageUtils
    extends java.lang.Object
    Utility class with message related methods.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MessageUtils()
      Prevent instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.charset.Charset getCharset​(javax.ws.rs.core.MediaType media)
      Get the character set from a media type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessageUtils

        private MessageUtils()
        Prevent instantiation.
    • Method Detail

      • getCharset

        public static java.nio.charset.Charset getCharset​(javax.ws.rs.core.MediaType media)
        Get the character set from a media type.

        The character set is obtained from the media type parameter "charset". If the parameter is not present the UTF8 charset is utilized.

        Parameters:
        media - the media type.
        Returns:
        the character set.