Nak.  This strips everything after the first line.  That's not what we want, is it?

To trim the trailing LF(s), use:

  int end = content.length;
  while (0 < end && content[end - 1] == '\n')
    end--;
  return RawParseUtils.decode(content, 0, end);