Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1614 | - | 1 | package dongfang.mkt.configuration; |
2 | |||
3 | public class StaticByteEntry extends ParameterEntry { |
||
4 | StaticByteEntry(String name) { |
||
5 | super(name); |
||
6 | } |
||
7 | |||
8 | int value; |
||
9 | |||
10 | int getByteCount() { |
||
11 | return 1; |
||
12 | } |
||
13 | |||
14 | int getValue() { |
||
15 | return value; |
||
16 | } |
||
17 | |||
18 | int setValue(int[] data, int offset) { |
||
19 | this.value = data[offset]; |
||
20 | return getByteCount(); |
||
21 | } |
||
22 | |||
23 | String toStringWithValues() { |
||
24 | return name + ":\t" + value; |
||
25 | } |
||
26 | |||
27 | void toXML(StringBuilder result) { |
||
28 | String s_value; |
||
29 | s_value = Integer.toString(value); |
||
30 | result.append(" <parameter name=\"" + name + "\" value=\"" |
||
31 | + s_value + "\"/>\n"); |
||
32 | } |
||
33 | } |