Code example for BasicHeader

0
        if (name == null)
            throw new IllegalArgumentException("Null name");
        if (value == null)
            throw new IllegalArgumentException("Null value");
 
        addHeader(new BasicHeader(name, value));
    } 
 
    /** 
     * Add header. 
     * 
     * @param header the header 
     */ 
    public static void addHeader(Header header) {
        if (header == null)
            throw new IllegalArgumentException("Null header");
 
        Set<Header> set = tlh.get();
        if (set == null) {
            set = new HashSet<Header>();