/** * Creates CompressionInputStream to be used to read off uncompressed data * in one of the two reading modes. i.e. Continuous or Blocked reading modes * * @param seekableIn The InputStream * @param start The start offset into the compressed stream * @param end The end offset into the compressed stream * @param readMode Controls whether progress is reported continuously or * only at block boundaries. * * @return CompressionInputStream for BZip2 aligned at block boundaries */ public SplitCompressionInputStream createInputStream(InputStream seekableIn, Decompressor decompressor, long start, long end, READ_MODE readMode) throws IOException { if (!(seekableIn instanceof Seekable)) { throw new IOException("seekableIn must be an instance of " + Seekable.class.getName()); } ((Seekable)seekableIn).seek(start); return new BZip2CompressionInputStream(seekableIn, start, end, readMode); }
/** * Create a {@link CompressionInputStream} that will read from the given * {@link InputStream} with the given {@link Decompressor}, and return a * stream for uncompressed data. * * @param in the stream to read compressed bytes from * @param decompressor decompressor to use * @return a stream to read uncompressed bytes from * @throws IOException */ @Override public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException { return Bzip2Factory.isNativeBzip2Loaded(conf) ? new DecompressorStream(in, decompressor, conf.getInt(IO_FILE_BUFFER_SIZE_KEY, IO_FILE_BUFFER_SIZE_DEFAULT)) : new BZip2CompressionInputStream( in, 0L, Long.MAX_VALUE, READ_MODE.BYBLOCK); }
/** * Creates CompressionInputStream to be used to read off uncompressed data * in one of the two reading modes. i.e. Continuous or Blocked reading modes * * @param seekableIn The InputStream * @param start The start offset into the compressed stream * @param end The end offset into the compressed stream * @param readMode Controls whether progress is reported continuously or * only at block boundaries. * * @return CompressionInputStream for BZip2 aligned at block boundaries */ public SplitCompressionInputStream createInputStream(InputStream seekableIn, Decompressor decompressor, long start, long end, READ_MODE readMode) throws IOException { if (!(seekableIn instanceof Seekable)) { throw new IOException("seekableIn must be an instance of " + Seekable.class.getName()); } ((Seekable)seekableIn).seek(start); return new BZip2CompressionInputStream(seekableIn, start, end, readMode); }
new BZip2CompressionInputStream(seekableIn, adjStart, end, readMode); in = new BZip2CompressionInputStream(seekableIn, start, end, readMode);
new BZip2CompressionInputStream(seekableIn, adjStart, end, readMode); in = new BZip2CompressionInputStream(seekableIn, start, end, readMode);
new BZip2CompressionInputStream(seekableIn, adjStart, end, readMode); in = new BZip2CompressionInputStream(seekableIn, start, end, readMode);
/** * Create a {@link CompressionInputStream} that will read from the given * {@link InputStream} with the given {@link Decompressor}, and return a * stream for uncompressed data. * * @param in the stream to read compressed bytes from * @param decompressor decompressor to use * @return a stream to read uncompressed bytes from * @throws IOException */ @Override public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException { return Bzip2Factory.isNativeBzip2Loaded(conf) ? new DecompressorStream(in, decompressor, conf.getInt(IO_FILE_BUFFER_SIZE_KEY, IO_FILE_BUFFER_SIZE_DEFAULT)) : new BZip2CompressionInputStream(in); }
/** * Create a {@link CompressionInputStream} that will read from the given * {@link InputStream} with the given {@link Decompressor}, and return a * stream for uncompressed data. * * @param in the stream to read compressed bytes from * @param decompressor decompressor to use * @return a stream to read uncompressed bytes from * @throws IOException */ @Override public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException { return Bzip2Factory.isNativeBzip2Loaded(conf) ? new DecompressorStream(in, decompressor, conf.getInt("io.file.buffer.size", 4*1024)) : new BZip2CompressionInputStream(in); }
/** * Create a {@link CompressionInputStream} that will read from the given * {@link InputStream} with the given {@link Decompressor}, and return a * stream for uncompressed data. * * @param in the stream to read compressed bytes from * @param decompressor decompressor to use * @return a stream to read uncompressed bytes from * @throws IOException */ @Override public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException { return Bzip2Factory.isNativeBzip2Loaded(conf) ? new DecompressorStream(in, decompressor, conf.getInt("io.file.buffer.size", 4*1024)) : new BZip2CompressionInputStream(in); }
/** * Create a {@link CompressionInputStream} that will read from the given * {@link InputStream} with the given {@link Decompressor}, and return a * stream for uncompressed data. * * @param in the stream to read compressed bytes from * @param decompressor decompressor to use * @return a stream to read uncompressed bytes from * @throws IOException */ @Override public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException { return Bzip2Factory.isNativeBzip2Loaded(conf) ? new DecompressorStream(in, decompressor, conf.getInt("io.file.buffer.size", 4*1024)) : new BZip2CompressionInputStream(in); }
/** * Creates CompressionInputStream to be used to read off uncompressed data. * * @param in * The InputStream * @return Returns CompressionInputStream for BZip2 * @throws java.io.IOException * Throws IOException */ public CompressionInputStream createInputStream(InputStream in) throws IOException { return new BZip2CompressionInputStream(in); }
/** * Creates CompressionInputStream to be used to read off uncompressed data. * * @param in * The InputStream * @return Returns CompressionInputStream for BZip2 * @throws java.io.IOException * Throws IOException */ public CompressionInputStream createInputStream(InputStream in) throws IOException { return new BZip2CompressionInputStream(in); }