Code example for DataInputStream

Methods: readUnsignedShort

0
     * 
     * @param file Input stream 
     * @throws IOException 
     */ 
    ConstantString(DataInputStream 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;
    } 
 
 
    /** 
     * Called by objects that are traversing the nodes of the tree implicitely 
     * defined by the contents of a Java class. I.e., the hierarchy of methods,