Class BaggageCodec

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static byte ESCAPE_CHAR  
      private static int RADIX  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BaggageCodec()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static byte[] decode​(byte[] bytes)
      Decodes an array of URL safe 7-bit characters into an array of original bytes.
      (package private) static java.lang.String decode​(java.lang.String value, java.nio.charset.Charset charset)
      Decodes an array of URL safe 7-bit characters into an array of original bytes.
      private static int digit16​(byte b)
      Returns the numeric value of the character b in radix 16.
      • Methods inherited from class java.lang.Object

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

      • BaggageCodec

        private BaggageCodec()
    • Method Detail

      • decode

        private static byte[] decode​(byte[] bytes)
        Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped characters are converted back to their original representation.
        Parameters:
        bytes - array of URL safe characters
        Returns:
        array of original bytes
      • decode

        static java.lang.String decode​(java.lang.String value,
                                       java.nio.charset.Charset charset)
        Decodes an array of URL safe 7-bit characters into an array of original bytes. Escaped characters are converted back to their original representation.
        Parameters:
        value - string of URL safe characters
        charset - encoding of given string
        Returns:
        decoded value
      • digit16

        private static int digit16​(byte b)
        Returns the numeric value of the character b in radix 16.
        Parameters:
        b - The byte to be converted.
        Returns:
        The numeric value represented by the character in radix 16.