code: public boolean isValid() {
          boolean valid = false;
          try {
              validate();
              valid = true;
          } catch(Exception e) {
              // File is not valid if exception thrown parsing.
              valid = false;
          }
      
          return valid;
      }
docs: Test Archive file is valid.
  Assumes the stream is at the start of the file.  Be aware that this
  method makes a pass over the whole file.
  @return True if file can be successfully parsed.