org.ssf4j.jdk.JdkSerialization Maven / Gradle / Ivy
package org.ssf4j.jdk;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.ssf4j.Serialization;
/**
* Serialization facade that uses the JDK's built-in serialization
* @author robin
*
*/
public class JdkSerialization implements Serialization {
/**
* {@inheritDoc}
*/
@Override
public JdkSerializer newSerializer(OutputStream out, Class type)
throws IOException {
return new JdkSerializer(out);
}
/**
* {@inheritDoc}
*/
@Override
public JdkDeserializer newDeserializer(InputStream in, Class type)
throws IOException {
return new JdkDeserializer(in);
}
@Override
public boolean isThreadSafe() {
return true;
}
}