Code example for DataInputStream

Methods: readUnsignedShort

0
    public void setLineNumber(int lineNumber) {
        this.lineNumber = lineNumber;
    } 
 
    public void read(DataInputStream stream) throws IOException {
        startPc = stream.readUnsignedShort();
        lineNumber = stream.readUnsignedShort();
    } 
 
    public void write(DataOutputStream stream) throws IOException {
        stream.writeShort(startPc);
        stream.writeShort(lineNumber);
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE