Search in sources :

Example 6 with HeaderParser

use of sun.net.www.HeaderParser in project jdk8u_jdk by JetBrains.

the class HeaderTests method main.

public static void main(String[] args) {
    MessageHeader head = createMessageHeader(s1);
    Iterator iter = head.multiValueIterator("Foo");
    checkHeader(iter, s1_Foo);
    iter = head.multiValueIterator("Fub");
    checkHeader(iter, s1_Fub);
    HeaderParser hp = new HeaderParser(s2).subsequence(1, 12);
    check(hp, s23_expect);
    hp = new HeaderParser(s3).subsequence(1, 12);
    check(hp, s23_expect);
    hp = new HeaderParser(s3).subsequence(0, 11);
    check(hp, s23_expect1);
    hp = new HeaderParser(s2).subsequence(4, 6);
    check(hp, s23_expect2);
}
Also used : HeaderParser(sun.net.www.HeaderParser) Iterator(java.util.Iterator) MessageHeader(sun.net.www.MessageHeader)

Aggregations

HeaderParser (sun.net.www.HeaderParser)6 MessageHeader (sun.net.www.MessageHeader)2 ProtocolException (java.net.ProtocolException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 Iterator (java.util.Iterator)1 MeteredStream (sun.net.www.MeteredStream)1