// Path: src/main/java/com/github/davidmoten/rx2/internal/flowable/buffertofile/SerializerBytes.java
// public final class SerializerBytes implements Serializer<byte[]> {
// 
//     @Override
//     public byte[] serialize(byte[] t) throws IOException {
//         return t;
//     }
// 
//     @Override
//     public byte[] deserialize(byte[] bytes) throws ClassNotFoundException, IOException {
//         return bytes;
//     }
// 
// }
// 
// Path: src/main/java/com/github/davidmoten/rx2/internal/flowable/buffertofile/SerializerJavaIO.java
// public final class SerializerJavaIO<T extends Serializable> implements Serializer<T> {
// 
//     @Override
//     public byte[] serialize(Serializable t) throws IOException {
//         ByteArrayOutputStream bos = new ByteArrayOutputStream();
//         ObjectOutputStream oos = new ObjectOutputStream(bos);
//         oos.writeObject(t);
//         bos.close();
//         return bos.toByteArray();
//     }
// 
//     @Override
//     public T deserialize(byte[] bytes) throws ClassNotFoundException, IOException {
//         ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
//         ObjectInputStream ois = null;
//         try {
//             ois = new ObjectInputStream(bis);
//             @SuppressWarnings("unchecked")
//             T t = (T) ois.readObject();
//             return t;
//         } finally {
//             if (ois != null) {
//                 ois.close();
//             }
//         }
//     }
// 
// }


import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.nio.charset.Charset;
import com.github.davidmoten.rx2.internal.flowable.buffertofile.SerializerBytes;
import com.github.davidmoten.rx2.internal.flowable.buffertofile.SerializerJavaIO;
package com.github.davidmoten.rx2.buffertofile;



public final class Serializers {

    private static final Charset UTF_8 = Charset.forName("UTF-8");

    private Serializers() {
        // prevent initialization
    }

    public static <T extends Serializable> Serializer<T> javaIO() {
        // TODO use holder
        return new SerializerJavaIO<T>();
    }

    public static Serializer<byte[]> bytes() {
        // TODO use holder
// Path: src/main/java/com/github/davidmoten/rx2/internal/flowable/buffertofile/SerializerBytes.java
// public final class SerializerBytes implements Serializer<byte[]> {
// 
//     @Override
//     public byte[] serialize(byte[] t) throws IOException {
//         return t;
//     }
// 
//     @Override
//     public byte[] deserialize(byte[] bytes) throws ClassNotFoundException, IOException {
//         return bytes;
//     }
// 
// }
// 
// Path: src/main/java/com/github/davidmoten/rx2/internal/flowable/buffertofile/SerializerJavaIO.java
// public final class SerializerJavaIO<T extends Serializable> implements Serializer<T> {
// 
//     @Override
//     public byte[] serialize(Serializable t) throws IOException {
//         ByteArrayOutputStream bos = new ByteArrayOutputStream();
//         ObjectOutputStream oos = new ObjectOutputStream(bos);
//         oos.writeObject(t);
//         bos.close();
//         return bos.toByteArray();
//     }
// 
//     @Override
//     public T deserialize(byte[] bytes) throws ClassNotFoundException, IOException {
//         ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
//         ObjectInputStream ois = null;
//         try {
//             ois = new ObjectInputStream(bis);
//             @SuppressWarnings("unchecked")
//             T t = (T) ois.readObject();
//             return t;
//         } finally {
//             if (ois != null) {
//                 ois.close();
//             }
//         }
//     }
// 
// }


// Path: src/main/java/com/github/davidmoten/rx2/buffertofile/Serializers.java
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.nio.charset.Charset;
import com.github.davidmoten.rx2.internal.flowable.buffertofile.SerializerBytes;
import com.github.davidmoten.rx2.internal.flowable.buffertofile.SerializerJavaIO;

package com.github.davidmoten.rx2.buffertofile;



public final class Serializers {

    private static final Charset UTF_8 = Charset.forName("UTF-8");

    private Serializers() {
        // prevent initialization
    }

    public static <T extends Serializable> Serializer<T> javaIO() {
        // TODO use holder
        return new SerializerJavaIO<T>();
    }

    public static Serializer<byte[]> bytes() {
        // TODO use holder
        return new SerializerBytes();