Code example for DataInput

Methods: readShort

0
    void write(DataOutput dataoutput) {
        dataoutput.writeShort(this.data);
    } 
 
    void load(DataInput datainput, int i) {
        this.data = datainput.readShort();
    } 
 
    public byte getTypeId() { 
        return (byte) 2; 
    } 
 
    public String toString() {
        return "" + this.data;
    } 
 
    public NBTBase clone() { 
        return new NBTTagShort(this.getName(), this.data);
    } 
 
    public boolean equals(Object object) {