Esempio n. 1
0
  private FSInputStream(SVNDeltaCombiner combiner, FSRepresentation representation, FSFS owner)
      throws SVNException {
    myCombiner = combiner;
    myChunkIndex = 0;
    isChecksumFinalized = false;
    myHexChecksum = representation.getMD5HexDigest();
    myOffset = 0;
    myLength = representation.getExpandedSize();
    try {
      myDigest = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException nsae) {
      SVNErrorMessage err =
          SVNErrorMessage.create(
              SVNErrorCode.IO_ERROR,
              "MD5 implementation not found: {0}",
              nsae.getLocalizedMessage());
      SVNErrorManager.error(err, nsae, SVNLogType.FSFS);
    }

    try {
      buildRepresentationList(representation, myRepStateList, owner);
    } catch (SVNException svne) {
      /*
       * Something terrible has happened while building rep list, need to
       * close any files still opened
       */
      close();
      throw svne;
    }
  }