mirror of
https://github.com/moparisthebest/mailiverse
synced 2024-08-13 16:53:55 -04:00
22 lines
431 B
Java
22 lines
431 B
Java
|
/**
|
||
|
* Author: Timothy Prepscius
|
||
|
* License: GPLv3 Affero + keep my name in the code!
|
||
|
*/
|
||
|
|
||
|
package core.util;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
|
||
|
public class SimpleSerializer
|
||
|
{
|
||
|
public static <T> byte[] serialize (T block) throws IOException
|
||
|
{
|
||
|
return JSONSerializer.serialize(block);
|
||
|
}
|
||
|
|
||
|
public static <T> T deserialize (byte[] bytes) throws IOException, ClassNotFoundException
|
||
|
{
|
||
|
return JSONSerializer.deserialize(bytes);
|
||
|
}
|
||
|
}
|