private int getOrInsertUtf8(String string) throws IOException { int nameIndex = constantPool.lookForUtf8Reference(string); if (nameIndex == -1) { nameIndex = constantPool.poolSize() + 1; Utf8Constant name = new Utf8Constant(string); constantPool.add(name); name.serializeToStream(constantStream); } return nameIndex; }
private int getObjectClassIndex() { int objectClassName = constantPool.lookForUtf8Reference(Object.class.getName().replace(".", "/")); return constantPool.lookForClass(objectClassName); }