private static Method getMethodNewInstanceFromObjectStreamClass(Number[] holder)
    {
        try
        {
            // android >= 4.3
            Method m43 = java.io.ObjectStreamClass.class.getDeclaredMethod(
                    "newInstance", Class.class, long.class);

            Method mcid43 = java.io.ObjectStreamClass.class.getDeclaredMethod(
                    "getConstructorId", Class.class);
            mcid43.setAccessible(true);
            holder[0] = (Number) mcid43.invoke(null, Object.class);

            return m43;
        }
        catch (Exception ex)
        {
            try
            {
                // android <= 4.2.2
                Method m = java.io.ObjectStreamClass.class.getDeclaredMethod(
                        "newInstance", Class.class, int.class);

                Method mcid = java.io.ObjectStreamClass.class.getDeclaredMethod(
                        "getConstructorId", Class.class);
                mcid.setAccessible(true);
                holder[0] = (Number) mcid.invoke(null, Object.class);

                return m;
            }
            catch (Exception e)
            {
                return null;
            }
        }
    }
If true, sun.misc.Unsafe is used to access the fields of the objects instead of plain java reflections. Enabled
by default if running on a sun jre.
protostuff-runtime-md/src/main/java/io/protostuff/runtime/RuntimeEnv.java