1 | public class DoubleCPInfo extends ConstantCPInfo {↵ | | 1 | public class LongCPInfo extends ConstantCPInfo {↵
|
|
2 | /**↵ | | 2 | /**↵
|
3 | * Constructor↵ | | 3 | Constructor↵
|
4 | */↵ | | 4 | . */↵
|
5 | public DoubleCPInfo() {↵ | | 5 | public LongCPInfo() {↵
|
6 | super(CONSTANT_DOUBLE, 2);↵ | | 6 | super(CONSTANT_LONG, 2);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * read a constant pool entry from a class stream.↵ | | 9 | * read a constant pool entry from a class stream.↵
|
10 | *↵ | | 10 | *↵
|
11 | * @param cpStream the DataInputStream which contains the constant pool↵ | | 11 | * @param cpStream the DataInputStream which contains the constant pool↵
|
12 | * entry to be read.↵ | | 12 | * entry to be read.↵
|
13 | * @exception IOException if there is a problem reading the entry from the↵ | | 13 | * @exception IOException if there is a problem reading the entry from↵
|
14 | * stream.↵ | | 14 | * the stream.↵
|
15 | */↵ | | 15 | */↵
|
16 | public void read(DataInputStream cpStream) throws IOException {↵ | | 16 | public void read(DataInputStream cpStream) throws IOException {↵
|
17 | setValue(new Double(cpStream.readDouble()));↵ | | 17 | setValue(new Long(cpStream.readLong()));↵
|
18 | }↵ | | 18 | }↵
|
|
19 | /**↵ | | 19 | /**↵
|
20 | * Print a readable version of the constant pool entry.↵ | | 20 | * Print a readable version of the constant pool entry.↵
|
21 | *↵ | | 21 | *↵
|
22 | * @return the string representation of this constant pool entry.↵ | | 22 | * @return the string representation of this constant pool entry.↵
|
23 | */↵ | | 23 | */↵
|
24 | public String toString() {↵ | | 24 | public String toString() {↵
|
25 | return "Double Constant Pool Entry: " + getValue();↵ | | 25 | return "Long Constant Pool Entry: " + getValue();↵
|
26 | | | 26 |
|