Class SafeEncoder


  • public final class SafeEncoder
    extends java.lang.Object
    The only reason to have this is to be able to compatible with java 1.5 :(
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.nio.charset.Charset DEFAULT_CHARSET  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String encode​(byte[] data)  
      static byte[] encode​(java.lang.String str)  
      static byte[][] encodeMany​(java.lang.String... strs)  
      static java.lang.Object encodeObject​(java.lang.Object dataToEncode)
      This method takes an object and will convert all bytes[] and list of byte[] and will encode the object in a recursive way.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_CHARSET

        public static volatile java.nio.charset.Charset DEFAULT_CHARSET
    • Method Detail

      • encodeMany

        public static byte[][] encodeMany​(java.lang.String... strs)
      • encode

        public static byte[] encode​(java.lang.String str)
      • encode

        public static java.lang.String encode​(byte[] data)
      • encodeObject

        public static java.lang.Object encodeObject​(java.lang.Object dataToEncode)
        This method takes an object and will convert all bytes[] and list of byte[] and will encode the object in a recursive way.
        Parameters:
        dataToEncode -
        Returns:
        the object fully encoded