Class PhpUnserializer

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

public class PhpUnserializer
extends java.lang.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 Summary

    Constructors 
    Constructor Description
    PhpUnserializer()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String encode​(byte[] decoded, java.nio.charset.Charset charset)  
    protected static int getNumberEndPosition​(java.lang.String data, int pos)  
    static java.lang.Object unserialize​(java.lang.String data)
    Unserializes string to an object.
    static java.lang.Object unserialize​(java.lang.String data, java.nio.charset.Charset charset)
    Unserializes string to an object.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • unserialize

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

      public static java.lang.Object unserialize​(java.lang.String data, java.nio.charset.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​(java.lang.String data, int pos)
    • encode

      public static java.lang.String encode​(byte[] decoded, java.nio.charset.Charset charset)