code: public void writeHeader() throws IOException, ConverterException {
          if (append) {
              return;
          }
          try {
              CompoundTag ebml = TagFactory.<CompoundTag> create("EBML").add(TagFactory.<UnsignedIntegerTag> create("EBMLVersion").setValue(1)).add(TagFactory.<UnsignedIntegerTag> create("EBMLReadVersion").setValue(1)).add(TagFactory.<UnsignedIntegerTag> create("EBMLMaxIDLength").setValue(4)).add(TagFactory.<UnsignedIntegerTag> create("EBMLMaxSizeLength").setValue(8))
                      .add(TagFactory.<StringTag> create("DocType").setValue("webm")).add(TagFactory.<UnsignedIntegerTag> create("DocTypeVersion").setValue(3)).add(TagFactory.<UnsignedIntegerTag> create("DocTypeReadVersion").setValue(2));
              byte[] hb = ebml.encode();
              bytesWritten += hb.length;
              dataFile.write(hb);
          } catch (IOException | ConverterException e) {
              log.error("Failed to write header", e);
              throw e;
          }
      }
docs: method to write webm header to the new file
  
  @throws IOException
  - in case of IO errors
  @throws ConverterException
  - in case of conversion errors