docs: public void putNextEntry(TarEntry entry) throws IOException {
          if (entry.getName().length() >= TarConstants.NAMELEN) {
  
              if (longFileMode == LONGFILE_GNU) {
                  // create a TarEntry for the LongLink, the contents
                  // of which are the entry's name
                  TarEntry longLinkEntry = new TarEntry(TarConstants.GNU_LONGLINK,
                                                        TarConstants.LF_GNUTYPE_LONGNAME);
  
                  byte[] name = entry.getName().getBytes(StandardCharsets.UTF_8);
                  longLinkEntry.setSize(name.length + 1);
                  putNextEntry(longLinkEntry);
                  write(name);
                  write(0);
                  closeEntry();
              } else if (longFileMode != LONGFILE_TRUNCATE) {
                  throw new RuntimeException("file name '" + entry.getName()
                                               + "' is too long ( > "
                                               + TarConstants.NAMELEN + " bytes)");
              }
          }
  
          entry.writeEntryHeader(this.recordBuf);
          this.buffer.writeRecord(this.recordBuf);
  
          this.currBytes = 0;
  
          if (entry.isDirectory()) {
              this.currSize = 0;
          } else {
              this.currSize = entry.getSize();
          }
          currName = entry.getName();
      }