importjava.util.List;importjava.util.Arrays;importorg.apache.fory.*;publicclassExample{// Note that Fory instances should be reused between// multiple serializations of different objects.staticThreadSafeFory fory =Fory.builder().withLanguage(Language.JAVA)// Allow to deserialize objects unknown types,// more flexible but less secure.// .requireClassRegistration(false).buildThreadSafeFory();static{// Registering types can reduce class name serialization// overhead but not mandatory.// If secure mode enabled//all custom types must be registered. fory.register(SomeClass.class);}publicstaticvoidmain(String[] args){SomeClass object =newSomeClass();byte[] bytes = fory.serialize(object);System.out.println(fory.deserialize(bytes));}}