/// <exception cref="System.IO.IOException"/> public void Finish() { try { @in.Close(); } finally { compressAlgo.ReturnDecompressor(decompressor); decompressor = null; } }
/// <exception cref="System.IO.IOException"/> public RBlockState(Compression.Algorithm compressionAlgo, FSDataInputStream fsin, BCFile.BlockRegion region, Configuration conf) { // Index for meta blocks this.compressAlgo = compressionAlgo; this.region = region; this.decompressor = compressionAlgo.GetDecompressor(); try { this.@in = compressAlgo.CreateDecompressionStream(new BoundedRangeFileInputStream (fsin, this.region.GetOffset(), this.region.GetCompressedSize()), decompressor, TFile.GetFSInputBufferSize(conf)); } catch (IOException e) { compressAlgo.ReturnDecompressor(decompressor); throw; } }