List of usage examples for org.apache.hadoop.io.compress.bzip2 CBZip2OutputStream flush
@Override public void flush() throws IOException
From source file:org.wikimedia.wikihadoop.TestStreamWikiDumpInputFormat.java
License:Apache License
private static byte[] bzip2(byte[] bytes, int bsize) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); CBZip2OutputStream c = new CBZip2OutputStream(os, bsize); c.write(bytes);//from w ww .ja v a2 s.com c.finish(); c.flush(); return os.toByteArray(); }