public boolean parseConstantPool(InputStream is) throws IOException {
  int count=readShort(is);
  _cpCount=count;
  if (_cpData == null || _cpData.length <= count) {
    _cpData=new int[count];
    _cpLengths=new int[count];
    _classData=new int[count];
  }
  Arrays.fill(_cpData,0);
  Arrays.fill(_cpLengths,0);
  Arrays.fill(_classData,0);
  int i=1;
  while (i < count) {
    int index=i;
    int code=is.read();
    if (code == ByteCodeParser.CP_LONG || code == ByteCodeParser.CP_DOUBLE)     i+=2;
 else     i+=1;
switch (code) {
case ByteCodeParser.CP_CLASS:
      int utf8Index=readShort(is);
    _classData[index]=utf8Index;
  break;
case ByteCodeParser.CP_FIELD_REF:
is.skip(4);
break;
case ByteCodeParser.CP_METHOD_REF:
is.skip(4);
break;
case ByteCodeParser.CP_INTERFACE_METHOD_REF:
is.skip(4);
break;
case ByteCodeParser.CP_STRING:
is.skip(2);
break;
case ByteCodeParser.CP_INTEGER:
is.skip(4);
break;
case ByteCodeParser.CP_FLOAT:
is.skip(4);
break;
case ByteCodeParser.CP_LONG:
is.skip(8);
break;
case ByteCodeParser.CP_DOUBLE:
is.skip(8);
break;
case ByteCodeParser.CP_NAME_AND_TYPE:
is.skip(4);
break;
case ByteCodeParser.CP_UTF8:
{
int length=readShort(is);
_cpData[index]=_charBufferOffset;
_cpLengths[index]=parseUtf8(is,length);
break;
}
case ByteCodeParser.CP_METHOD_HANDLE:
is.skip(3);
break;
case ByteCodeParser.CP_METHOD_TYPE:
is.skip(2);
break;
case ByteCodeParser.CP_INVOKE_DYNAMIC:
is.skip(4);
break;
default :
throw error(L.l("'{0}' is an unknown constant pool type.",code));
}
}
return false;
}

public boolean parseConstantPool ( InputStream is ) throws IOException { int count = readShort ( is ) ; _cpCount = count ; if ( _cpData == null || _cpData . length <= count ) { _cpData = new int [ count ] ; _cpLengths = new int [ count ] ; _classData = new int [ count ] ; } Arrays . fill ( _cpData , 0 ) ; Arrays . fill ( _cpLengths , 0 ) ; Arrays . fill ( _classData , 0 ) ; int i = 1 ; while ( i < count ) { int index = i ; int code = is . read ( ) ; if ( code == ByteCodeParser . CP_LONG || code == ByteCodeParser . CP_DOUBLE ) i += 2 ; else i += 1 ; switch ( code ) { case ByteCodeParser . CP_CLASS : int utf8Index = readShort ( is ) ; _classData [ index ] = utf8Index ; break ; case ByteCodeParser . CP_FIELD_REF : is . skip ( 4 ) ; break ; case ByteCodeParser . CP_METHOD_REF : is . skip ( 4 ) ; break ; case ByteCodeParser . CP_INTERFACE_METHOD_REF : is . skip ( 4 ) ; break ; case ByteCodeParser . CP_STRING : is . skip ( 2 ) ; break ; case ByteCodeParser . CP_INTEGER : is . skip ( 4 ) ; break ; case ByteCodeParser . CP_FLOAT : is . skip ( 4 ) ; break ; case ByteCodeParser . CP_LONG : is . skip ( 8 ) ; break ; case ByteCodeParser . CP_DOUBLE : is . skip ( 8 ) ; break ; case ByteCodeParser . CP_NAME_AND_TYPE : is . skip ( 4 ) ; break ; case ByteCodeParser . CP_UTF8 : { int length = readShort ( is ) ; _cpData [ index ] = _charBufferOffset ; _cpLengths [ index ] = parseUtf8 ( is , length ) ; break ; } case ByteCodeParser . CP_METHOD_HANDLE : is . skip ( 3 ) ; break ; case ByteCodeParser . CP_METHOD_TYPE : is . skip ( 2 ) ; break ; case ByteCodeParser . CP_INVOKE_DYNAMIC : is . skip ( 4 ) ; break ; default : throw error ( L . l ( "'{0}' is an unknown constant pool type." , code ) ) ; } } return false ; }
parses the constant pool .
