public void testPigLineRecordReaderBZip() {
try {
File testFile = File.createTempFile("testPigLineRecordReaderBZip", ".txt.bz");
OutputStream os = new FileOutputStream( testFile );
CBZip2OutputStream out = new CBZip2OutputStream( os );
// Code to fill up the buffer
byte[] buffer = new byte[LOOP_COUNT * LOOP_COUNT ];
for( int i = 0; i < LOOP_COUNT; i++ ) {
for( int j = 0; j < LOOP_COUNT; j++ ) {
buffer[ i * LOOP_COUNT + j ] = (byte) (j/LOOP_COUNT * 26 + 97);
}
}
out.write(buffer, 0, buffer.length);
out.close();
LocalSeekableInputStream is = new LocalSeekableInputStream( testFile );
CBZip2InputStream bzis = new CBZip2InputStream( is );
BufferedPositionedInputStream bpis = new BufferedPositionedInputStream( bzis );