private byte getConstantPoolStringFirstByte ( final int cpIdx ) throws ClassfileFormatException , IOException { final int constantPoolStringOffset = getConstantPoolStringOffset ( cpIdx , /* subFieldIdx = */ 0 ) ; if ( constantPoolStringOffset == 0 ) { return ' ' ; } final int utfLen = inputStreamOrByteBuffer . readUnsignedShort ( constantPoolStringOffset ) ; if ( utfLen == 0 ) { return ' ' ; } return inputStreamOrByteBuffer . buf [ constantPoolStringOffset + 2 ] ; }
Get the first UTF8 byte of a string in the constant pool or \ 0 if the string is null or empty .