All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jfirer.fse.Helper Maven / Gradle / Ivy

The newest version!
package com.jfirer.fse;

public class Helper
{

    public static Object deSerialize(InternalByteArray byteArray, FseContext fseContext)
    {
        int flag = byteArray.readVarInt();
        if (flag == 0)
        {
            return null;
        }
        else if (flag > 0)
        {
            return fseContext.getClassRegistry(flag).getSerializer().readBytes(byteArray, fseContext);
        }
        else
        {
            return fseContext.getObjectByIndex(0 - flag);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy