com.jfirer.fse.Helper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Fse Show documentation
Show all versions of Fse Show documentation
a high speed serilaize library
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);
}
}
}