public long getCrc64()
  {
    try {
      if (isDirectory()) {
        String []list = list();

        long digest = 0x1;

        for (int i = 0; i < list.length; i++) {
          digest = Crc64.generate(digest, list[i]);
        }

        return digest;
      }
      else if (canRead()) {
        ReadStreamOld is = openRead();

        try {
          long digest = 0x1;

          byte []buffer = is.buffer();
          while (is.fillBuffer() > 0) {
            int length = is.getLength();

            digest = Crc64.generate(digest, buffer, 0, length);
          }

          return digest;
        } finally {
          is.close();
        }
      }
      else {
        return 0; // Depend requires -1
      }
    } catch (IOException e) {
      // XXX: log
      e.printStackTrace();

      return -1;
    }
  }
public long getCrc64 ( ) { try { if ( isDirectory ( ) ) { String [ ] list = list ( ) ; long digest = 0x1 ; for ( int i = 0 ; i < list . length ; i ++ ) { digest = Crc64 . generate ( digest , list [ i ] ) ; } return digest ; } else if ( canRead ( ) ) { ReadStreamOld is = openRead ( ) ; try { long digest = 0x1 ; byte [ ] buffer = is . buffer ( ) ; while ( is . fillBuffer ( ) > 0 ) { int length = is . getLength ( ) ; digest = Crc64 . generate ( digest , buffer , 0 , length ) ; } return digest ; } finally { is . close ( ) ; } } else { return 0 ; } } catch ( IOException e ) { e . printStackTrace ( ) ; return - 1 ; } }
Returns the crc64 code.