예제 #1
0
 public void addHeader(String name, String value) {
   char cc = name.charAt(0);
   if (cc == 'C' || cc == 'c') {
     if (checkSpecialHeader(name, value)) return;
   }
   headers.addValue(name).setString(value);
 }
예제 #2
0
 public void addHeader(String name, String value, Charset charset) {
   char cc = name.charAt(0);
   if (cc == 'C' || cc == 'c') {
     if (checkSpecialHeader(name, value)) return;
   }
   MessageBytes mb = headers.addValue(name);
   if (charset != null) {
     mb.setCharset(charset);
   }
   mb.setString(value);
 }