Exemplo n.º 1
0
  /**
   * @param reliable The ReliableFile on which to read.
   * @param generation a specific generation requested.
   * @param openMask mask used to open data. are invalid (corrupt, missing, etc).
   * @throws IOException If an error occurs opening the file.
   */
  private ReliableFileInputStream(ReliableFile reliable, int generation, int openMask)
      throws IOException {
    super(reliable.getInputStream(generation, openMask));

    this.reliable = reliable;
    sigSize = reliable.getSignatureSize();
    readPos = 0;
    length = super.available();
    if (sigSize > length) length = 0; // shouldn't ever happen
    else length -= sigSize;
  }