generateHeaderForXML static method

String generateHeaderForXML(
  1. String xml
)

Implementation

static String generateHeaderForXML(String xml) {
  int length = utf8.encode(xml).length;
  String temp = length.toRadixString(16).padLeft(6, "0");
  String header = "0100" + temp;
  return header;
}