code: protected void closeCurrentEntry() throws IOException {
          if (currentEntry != null) {
              if (currentEntry.getSize() > currentFileSize) {
                  throw new IOException( "The current entry[" + currentEntry.getName() + "] of size["
                          + currentEntry.getSize() + "] has not been fully written." );
              }
  
              currentEntry = null;
              currentFileSize = 0;
  
              pad();
          }
      }
docs: Closes the current tar entry
  
  @throws IOException