Code example for DataInput

Methods: readUnsignedShort

0
     * 
     * @param file Input stream 
     * @throws IOException 
     */ 
    ConstantString(DataInput file) throws IOException {
        this(file.readUnsignedShort());
    } 
 
 
    /** 
     * @param string_index Index of Constant_Utf8 in constant pool 
     */ 
    public ConstantString(int string_index) {
        super(Constants.CONSTANT_String); 
        this.string_index = string_index;
    } 
 
 
    /** 
     * Dump constant field reference to file stream in binary format. 
Connect your IDE to all the code out there  Get Codota for Java