01: /*
02: * UTF8.java Copyright (c) 2006,07 Swaroop Belur
03: *
04: * This program is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU General Public License
06: * as published by the Free Software Foundation; either version 2
07: * of the License, or (at your option) any later version.
08:
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13:
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17: *
18: */
19:
20: package net.sf.jdec.constantpool;
21:
22: public class UTF8 {
23:
24: private int length;
25: private int tag;
26: private byte[] bytes = null;
27: private int cppos;
28:
29: public int getLength() {
30: return length;
31: }
32:
33: public void setLength(int length) {
34: this .length = length;
35: bytes = new byte[this .length];
36: }
37:
38: public void initialize(byte[] contents) {
39: System.arraycopy(contents, 0, bytes, 0, this .length);
40: }
41:
42: public int getTag() {
43: return tag;
44: }
45:
46: public void setTag(int tag) {
47: this .tag = tag;
48: }
49:
50: public byte[] getBytes() {
51: return bytes;
52: }
53:
54: public int getCppos() {
55: return cppos;
56: }
57:
58: public void setCppos(int cppos) {
59: this .cppos = cppos;
60: }
61:
62: public void setStringValue(java.lang.String s) {
63:
64: stringVal = s;
65: }
66:
67: public String getStringVal() {
68:
69: return stringVal;
70: }
71:
72: private java.lang.String stringVal = "";
73:
74: }
|