strangedb/src/main/java/it/cavallium/strangedb/java/database/ISerializer.java

20 lines
516 B
Java

package it.cavallium.strangedb.java.database;
import java.io.IOException;
import java.util.Map;
public interface ISerializer {
<T> Class<T> readClassBytes(byte[] input) throws IOException;
byte[] writeClassBytes(Class<?> toWrite) throws IOException;
<T> byte[] writeClassAndObjectBytes(T value) throws IOException;
@SuppressWarnings("unchecked")
<T> T readClassAndObjectBytes(byte[] input) throws IOException;
void registerClass(Class<?> type, int id);
Map<Class<?>, Integer> getRegisteredClasses();
}