Code example for DataInputStream

Methods: readUnsignedShort

0
    public void setStringIndex(short stringIndex) {
        this.stringIndex = stringIndex;
    } 
 
    public void read(DataInputStream stream) throws IOException {
        stringIndex = stream.readUnsignedShort();
    } 
 
    public void write(DataOutputStream stream) throws IOException {
        stream.writeByte(TAG);
        stream.writeShort(stringIndex);
    } 
 
    public static int indexOf(List<ConstantPoolInfo> pool, int stringIndex) {
        ConstantPoolInfo info;
 
        for (int i = 0; i < pool.size(); i++) {
            info = pool.get(i);
 
            if (info == null) {
                continue;