Code example for ByteBuffer

Methods: put, putShort

0
        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() { 
        final int prime = 359;
        int result = super.hashCode();
        result = prime * result + networkTypeOfService;
        return result;
    } 
 
    @Override 
    public boolean equals(Object obj) {