code: void writeExtensionString(int extensionType, String str) throws IOException {
          byte[] bytes = str.getBytes(UTF_8);
          if (bytes.length > 256) {
              throw new IllegalArgumentException("String too long");
          }
          output.write(EXT_8);
          output.write(bytes.length);
          output.write(extensionType);
          output.write(bytes);
      }
docs: Writes an extension string using EXT_8.
  
  @param extensionType  the type
  @param str  the string to write as the data
  @throws IOException if an error occurs