Ejemplo n.º 1
0
 /// <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;
     }
 }