1 23 24 25 package com.sun.jdo.api.persistence.enhancer.classfile; 26 27 import java.io.*; 28 29 32 33 public class ConstUtf8 extends ConstBasic { 34 35 public static final int MyTag = CONSTANTUtf8; 36 37 38 private String stringValue; 39 40 41 42 45 public int tag () { return MyTag; } 46 47 50 public String asString () { 51 return stringValue; 52 } 53 54 57 public String toString () { 58 return "CONSTANTUtf8(" + indexAsString() + "): " + asString(); } 60 61 62 ConstUtf8 (String s) { 63 stringValue = s; 64 } 65 66 void formatData (DataOutputStream b) throws IOException { 67 b.writeUTF(stringValue); 68 } 69 70 static ConstUtf8 read (DataInputStream input) throws IOException { 71 return new ConstUtf8 (input.readUTF()); 72 } 73 74 void resolve (ConstantPool p) { 75 } 76 } 77 78 79 | Popular Tags |