public final List<FooterLine> getFooterLines() {final byte[] raw = buffer;int ptr = raw.length - 1;while (raw[ptr] == '\n') ptr--;final int msgB = RawParseUtils.commitMessage(raw, 0);final ArrayList<FooterLine> r = new ArrayList<>(4);final Charset enc = guessEncoding();for (;;) {ptr = RawParseUtils.prevLF(raw, ptr);if (ptr <= msgB)break; final int keyStart = ptr + 2;if (raw[keyStart] == '\n')break; final int keyEnd = RawParseUtils.endOfFooterLineKey(raw, keyStart);if (keyEnd < 0)continue; int valStart = keyEnd + 1;while (valStart < raw.length && raw[valStart] == ' ')valStart++;int valEnd = RawParseUtils.nextLF(raw, valStart);if (raw[valEnd - 1] == '\n')valEnd--;r.add(new FooterLine(raw, enc, keyStart, keyEnd, valStart, valEnd));}Collections.reverse(r);return r;}

public IList<FooterLine> GetFooterLines(){byte[] raw = buffer;int ptr = raw.Length - 1;while (raw[ptr] == '\n'){ptr--;}int msgB = RawParseUtils.CommitMessage(raw, 0);AList<FooterLine> r = new AList<FooterLine>(4);System.Text.Encoding enc = Encoding;for (; ; ){ptr = RawParseUtils.PrevLF(raw, ptr);if (ptr <= msgB){break;}int keyStart = ptr + 2;if (raw[keyStart] == '\n'){break;}int keyEnd = RawParseUtils.EndOfFooterLineKey(raw, keyStart);if (keyEnd < 0){continue;}int valStart = keyEnd + 1;while (valStart < raw.Length && raw[valStart] == ' '){valStart++;}int valEnd = RawParseUtils.NextLF(raw, valStart);if (raw[valEnd - 1] == '\n'){valEnd--;}r.AddItem(new FooterLine(raw, enc, keyStart, keyEnd, valStart, valEnd));}Sharpen.Collections.Reverse(r);return r;}
