code: public void close() throws IOException {
          if (!closed) {
              this.finish();
              this.buffer.close();
              out.close();
              closed = true;
          }
      }
docs: Ends the TAR archive and closes the underlying OutputStream.
  This means that finish() is called followed by calling the
  TarBuffer's close().
  @throws IOException on error