01: // HttpString.java
02: // $Id: HttpString.java,v 1.5 1998/01/22 14:29:20 bmahe Exp $$
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.www.http;
07:
08: public class HttpString extends BasicValue {
09: String value = null;
10:
11: protected void parse() {
12: return;
13: }
14:
15: protected void updateByteValue() {
16: raw = new byte[value.length()];
17: value.getBytes(0, raw.length, raw, 0);
18: return;
19: }
20:
21: public Object getValue() {
22: validate();
23: if (value == null)
24: value = new String(raw, 0, 0, raw.length);
25: return value;
26: }
27:
28: public void setValue(String value) {
29: invalidateByteValue();
30: this .value = value;
31: this .isValid = true;
32: }
33:
34: HttpString(boolean isValid, String value) {
35: this .value = value;
36: this .isValid = true;
37: }
38:
39: HttpString() {
40: this .isValid = false;
41: }
42: }
|