001package org.anarres.lzo.hadoop.codec;
002
003import java.io.IOException;
004import java.io.OutputStream;
005import org.apache.hadoop.io.compress.CompressionOutputStream;
006
007public class LzopOutputStream extends CompressionOutputStream {
008
009    public LzopOutputStream(OutputStream out, LzoCompressor.CompressionStrategy strategy, int bufferSize) throws IOException {
010        super(new org.anarres.lzo.LzopOutputStream(out, strategy.newCompressor(), bufferSize));
011    }
012
013    @Override
014    public void write(byte[] buf, int off, int len) throws IOException {
015        out.write(buf, off, len);
016    }
017
018    @Override
019    public void write(int b) throws IOException {
020        out.write(b);
021    }
022
023    @Override
024    public void finish() throws IOException {
025    }
026
027    @Override
028    public void resetState() throws IOException {
029        throw new UnsupportedOperationException("Not supported yet.");
030    }
031}