Code example for ByteBuffer

Methods: get, getShort

0
        this.networkTypeOfService = networkTypeOfService;
    } 
 
    @Override 
    public void readFrom(ByteBuffer data) {
        super.readFrom(data);
        this.networkTypeOfService = data.get();
        data.getShort();
        data.get();
    } 
 
    @Override 
    public void writeTo(ByteBuffer data) {
        super.writeTo(data);
        data.put(this.networkTypeOfService);
        data.putShort((short) 0);
        data.put((byte) 0);
    } 
 
    @Override 
    public int hashCode() {