Class ClassLoaderObjectInputStream

java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
fr.ens.biologie.genomique.eoulsan.util.ClassLoaderObjectInputStream
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, ObjectStreamConstants, AutoCloseable

public class ClassLoaderObjectInputStream extends ObjectInputStream
This class allow to use ObjectInputStream with a ClassLoader that is not the default bootstrap ClassLoader. This is very useful is Hadoop mode.
Since:
2.0
Author:
Laurent Jourdren
  • Constructor Details

    • ClassLoaderObjectInputStream

      public ClassLoaderObjectInputStream(InputStream in) throws IOException
      Constructor, use the thread ClassLoader to load classes of objects to instantiate.
      Parameters:
      in - input stream
      Throws:
      IOException - if an I/O error occurs while reading stream header
    • ClassLoaderObjectInputStream

      public ClassLoaderObjectInputStream(ClassLoader classLoader, InputStream in) throws IOException
      Constructor.
      Parameters:
      classLoader - ClassLoader to use to load classes of objects to instantiate.
      in - input stream
      Throws:
      IOException - if an I/O error occurs while reading stream header