Class HadoopCompressionCodecs


  • public class HadoopCompressionCodecs
    extends Object
    This class allow to create input and output stream for compression codec of Hadoop.
    Since:
    2.0
    Author:
    Laurent Jourdren
    • Constructor Detail

      • HadoopCompressionCodecs

        public HadoopCompressionCodecs()
    • Method Detail

      • createBZip2InputStream

        public static InputStream createBZip2InputStream​(InputStream is)
                                                  throws IOException
        Create a bzip2 input stream.
        Parameters:
        is - input stream
        Returns:
        an uncompressed input stream
        Throws:
        IOException - if an error occurs while creating the input stream
      • createBZip2OutputStream

        public static OutputStream createBZip2OutputStream​(OutputStream os)
                                                    throws IOException
        Create a bzip2 output stream.
        Parameters:
        os - the output stream to compress
        Returns:
        a compressed output stream
        Throws:
        IOException - if an error occurs while creating the output stream