code: private void record(int b) throws IOException {
          if (this.shouldDigest) {
              this.digest.update((byte)b);
          }
          if (this.position >= this.buffer.length) {
              this.ensureDiskStream().write(b);
          } else {
              this.buffer[(int) this.position] = (byte) b;
          }
          this.position++;
      }
docs: Record the given byte for later recovery
  
  @param b Int to record.
  
  @exception IOException Failed write to backing file.