code: private Utf8Constant parseUtf8Constant(int index)
      throws IOException
    {
      int length = readShort();
      
      StringBuilder cb = new StringBuilder();
  
      for (int i = 0; i < length; i++) {
        int ch = read();
  
        if (ch < 0x80) {
          cb.append((char) ch);
        }
        else if ((ch & 0xe0) == 0xc0) {
          int ch2 = read();
          i++;
  
          cb.append((char) (((ch & 0x1f) << 6)+
                            (ch2 & 0x3f)));
        }
        else {
          int ch2 = read();
          int ch3 = read();
          i += 2;
        
          cb.append((char) (((ch & 0xf) << 12)+
                            ((ch2 & 0x3f) << 6) +
                            ((ch3 & 0x3f))));
        }
      }
  
      return new Utf8Constant(_class.getConstantPool(), index, cb.toString());
    }
docs: Parses a utf-8 constant pool entry.