Class PhpUnserializer

java.lang.Object
rs.baselib.php.PhpUnserializer

public class PhpUnserializer extends Object
Unerializes PHP format string to Java objects.

Implementation based on pherialize by Klaus Reimer: https://github.com/kayahr/pherialize/blob/master

Since:
1.2.6
Author:
ralph
  • Constructor Details

    • PhpUnserializer

      public PhpUnserializer()
  • Method Details

    • unserialize

      public static Object unserialize(String data)
      Unserializes string to an object.
      Parameters:
      data - the data string
      Returns:
      The unserialized object
      Since:
      1.2.6
    • unserialize

      public static Object unserialize(String data, Charset charset)
      Unserializes string to an object.
      Parameters:
      data - the data string
      charset - the charset to use
      Returns:
      The unserialized object
      Since:
      1.2.6
    • getNumberEndPosition

      protected static int getNumberEndPosition(String data, int pos)
    • encode

      public static String encode(byte[] decoded, Charset charset)