@Test public void testNameValueListParseEmpty() { ByteSequence buf = ContentUtil.encode(" "); ParserCursor cursor = new ParserCursor(0, buf.length()); List<NameValuePair> params = parser.parseParameters(buf, cursor); org.junit.Assert.assertEquals(0, params.size()); }
public List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor) { List<NameValuePair> params = new ArrayList<NameValuePair>(); skipWhiteSpace(buf, cursor); while (!cursor.atEnd()) { NameValuePair param = parseParameter(buf, cursor); params.add(param); } return params; }
RawFieldParser { public List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor) { List<NameValuePair> params = new ArrayList<NameValuePair>(); skipWhiteSpace(buf, cursor); while (!cursor.atEnd()) { NameValuePair param = parseParameter(buf, cursor); params.add(param); } return params; } }
RawFieldParser { public List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor) { List<NameValuePair> params = new ArrayList<NameValuePair>(); skipWhiteSpace(buf, cursor); while (!cursor.atEnd()) { NameValuePair param = parseParameter(buf, cursor); params.add(param); } return params; }  }
RawFieldParser { public List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor) { List<NameValuePair> params = new ArrayList<NameValuePair>(); skipWhiteSpace(buf, cursor); while (!cursor.atEnd()) { NameValuePair param = parseParameter(buf, cursor); params.add(param); } return params; }  static BitSet INIT_BITSET(int ... b); RawField parseField(final ByteSequence raw); RawBody parseRawBody(final RawField field); RawBody parseRawBody(final ByteSequence buf, final ParserCursor cursor); List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor); NameValuePair parseParameter(final ByteSequence buf, final ParserCursor cursor); String parseToken(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters); String parseValue(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters); void skipWhiteSpace(final ByteSequence buf, final ParserCursor cursor); void skipComment(final ByteSequence buf, final ParserCursor cursor); void skipAllWhiteSpace(final ByteSequence buf, final ParserCursor cursor); void copyContent(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters,
            final StringBuilder dst); void copyUnquotedContent(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters,
                            final StringBuilder dst); void copyQuotedContent(final ByteSequence buf, final ParserCursor cursor,
            final StringBuilder dst); }
RawFieldParser { public List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor) { List<NameValuePair> params = new ArrayList<NameValuePair>(); skipWhiteSpace(buf, cursor); while (!cursor.atEnd()) { NameValuePair param = parseParameter(buf, cursor); params.add(param); } return params; }  static BitSet INIT_BITSET(int ... b); RawField parseField(final ByteSequence raw); RawBody parseRawBody(final RawField field); RawBody parseRawBody(final ByteSequence buf, final ParserCursor cursor); List<NameValuePair> parseParameters(final ByteSequence buf, final ParserCursor cursor); NameValuePair parseParameter(final ByteSequence buf, final ParserCursor cursor); String parseToken(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters); String parseValue(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters); void skipWhiteSpace(final ByteSequence buf, final ParserCursor cursor); void skipComment(final ByteSequence buf, final ParserCursor cursor); void skipAllWhiteSpace(final ByteSequence buf, final ParserCursor cursor); void copyContent(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters,
            final StringBuilder dst); void copyUnquotedContent(final ByteSequence buf, final ParserCursor cursor, final BitSet delimiters,
                            final StringBuilder dst); void copyQuotedContent(final ByteSequence buf, final ParserCursor cursor,
            final StringBuilder dst); static final RawFieldParser DEFAULT; }