/** * This can be used to add a HTTP message header to this object. * The name and value of the HTTP message header will be used to * create a HTTP message header object which can be retrieved using * the <code>getInteger</code> in combination with the get methods. * * @param name the name of the HTTP message header to be added * @param value the value the HTTP message header will have */ public void addInteger(String name, int value) { addValue(name, String.valueOf(value)); }
/** * This can be used to add a HTTP message header to this object. * The name and value of the HTTP message header will be used to * create a HTTP message header object which can be retrieved using * the <code>getInteger</code> in combination with the get methods. * * @param name the name of the HTTP message header to be added * @param value the value the HTTP message header will have */ public void addInteger(String name, int value) { addValue(name, String.valueOf(value)); }
/** * This can be used to add a HTTP message header to this object. * The name and value of the HTTP message header will be used to * create a HTTP message header object which can be retrieved using * the <code>getInteger</code> in combination with the get methods. * * @param name the name of the HTTP message header to be added * @param value the value the HTTP message header will have */ public void addInteger(String name, int value) { addValue(name, String.valueOf(value)); }
/** * This is used as a convenience method for adding a header that * needs to be parsed into a HTTPdate string. This will convert * the date given into a date string defined in RFC 2616 sec 3.3.1. * * @param name the name of the HTTP message header to be added * @param date the value constructed as an RFC 1123 date string */ public void addDate(String name, long date) { addValue(name, parser.convert(date)); }
/** * This is used as a convenience method for adding a header that * needs to be parsed into a HTTPdate string. This will convert * the date given into a date string defined in RFC 2616 sec 3.3.1. * * @param name the name of the HTTP message header to be added * @param date the value constructed as an RFC 1123 date string */ public void addDate(String name, long date) { addValue(name, parser.convert(date)); }
/** * This is used as a convenience method for adding a header that * needs to be parsed into a HTTPdate string. This will convert * the date given into a date string defined in RFC 2616 sec 3.3.1. * * @param name the name of the HTTP message header to be added * @param date the value constructed as an RFC 1123 date string */ public void addDate(String name, long date) { addValue(name, parser.convert(date)); }
/** * This is used to add the name and value specified as a special * header within the segment. Special headers are those where * there are values of interest to the segment. For instance the * Content-Length, Content-Type, and Cookie headers are parsed * using an external parser to extract the values. * * @param name this is the name of the header to be added * @param value this is the value of the header to be added */ protected void add(String name, String value) { if(equal(ACCEPT_LANGUAGE, name)) { language(value); }else if(equal(CONTENT_LENGTH, name)) { length(value); } else if(equal(CONTENT_TYPE, name)) { type(value); } else if(equal(CONTENT_DISPOSITION, name)) { disposition(value); } else if(equal(TRANSFER_ENCODING, name)) { encoding(value); } else if(equal(EXPECT, name)) { expect(value); } else if(equal(COOKIE, name)) { cookie(value); } header.addValue(name, value); }
/** * This is used to add the name and value specified as a special * header within the segment. Special headers are those where * there are values of interest to the segment. For instance the * Content-Length, Content-Type, and Cookie headers are parsed * using an external parser to extract the values. * * @param name this is the name of the header to be added * @param value this is the value of the header to be added */ protected void add(String name, String value) { if(equal(ACCEPT_LANGUAGE, name)) { language(value); }else if(equal(CONTENT_LENGTH, name)) { length(value); } else if(equal(CONTENT_TYPE, name)) { type(value); } else if(equal(CONTENT_DISPOSITION, name)) { disposition(value); } else if(equal(TRANSFER_ENCODING, name)) { encoding(value); } else if(equal(EXPECT, name)) { expect(value); } else if(equal(COOKIE, name)) { cookie(value); } header.addValue(name, value); }
/** * This is used to add the name and value specified as a special * header within the segment. Special headers are those where * there are values of interest to the segment. For instance the * Content-Length, Content-Type, and Cookie headers are parsed * using an external parser to extract the values. * * @param name this is the name of the header to be added * @param value this is the value of the header to be added */ protected void add(String name, String value) { if(equal(ACCEPT_LANGUAGE, name)) { language(value); }else if(equal(CONTENT_LENGTH, name)) { length(value); } else if(equal(CONTENT_TYPE, name)) { type(value); } else if(equal(CONTENT_DISPOSITION, name)) { disposition(value); } else if(equal(TRANSFER_ENCODING, name)) { encoding(value); } else if(equal(EXPECT, name)) { expect(value); } else if(equal(COOKIE, name)) { cookie(value); } header.addValue(name, value); }