private void readToEnd() throws FitsException {
  while (this.dataStr != null && !this.atEOF) {
    try {
      if (readHDU() == null) {
        break;
      }
    }
 catch (    EOFException e) {
      if (FitsFactory.getAllowTerminalJunk() && e.getCause() instanceof TruncatedFileException && getNumberOfHDUs() > 0) {
        this.atEOF=true;
        return;
      }
      throw new FitsException("IO error: " + e);
    }
catch (    IOException e) {
      throw new FitsException("IO error: " + e);
    }
  }
}

private void readToEnd ( ) throws FitsException { while ( this . dataStr != null && ! this . atEOF ) { try { if ( readHDU ( ) == null ) { break ; } } catch ( EOFException e ) { if ( FitsFactory . getAllowTerminalJunk ( ) && e . getCause ( ) instanceof TruncatedFileException && getNumberOfHDUs ( ) > 0 ) { this . atEOF = true ; return ; } throw new FitsException ( "IO error: " + e ) ; } catch ( IOException e ) { throw new FitsException ( "IO error: " + e ) ; } } }
read to the end of the associated input stream
