Code example for DataInput

Methods: readUnsignedShort

0
        return i;
    } 
 
    public int readUnsignedShort() throws IOException 
    { 
        int i = source.readUnsignedShort();
        bytesRead += 2;
        return i;
    } 
 
    public int skipBytes(int n) throws IOException
    { 
        int skipped = source.skipBytes(n);
        bytesRead += skipped;
        return skipped;
    } 
}