Mercurial > hg > Applications > TreeVNC
view src/main/java/jp/ac/u_ryukyu/treevnc/UpdateRectangleMessage.java @ 145:649794dfb9d5
add my hostname to handle multiple network
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Jun 2014 22:01:05 +0900 |
parents | 8f4c45c1b396 |
children | 86289e56263c |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import java.nio.ByteBuffer; import java.nio.ByteOrder; import com.glavsoft.rfb.encoding.EncodingType; public class UpdateRectangleMessage { private ByteBuffer msg = ByteBuffer.allocate(16).order(ByteOrder.BIG_ENDIAN); public UpdateRectangleMessage(int i, int j, int width, int height, EncodingType desktopSize) { msg.put((byte) 0); // FrameBufferUpdate msg.put((byte) 0); // padding msg.putShort((short) 1); // number of rectangle msg.putShort((short) i); msg.putShort((short) j); msg.putShort((short) width); msg.putShort((short) height); msg.putInt(desktopSize.getId()); msg.flip(); } public ByteBuffer getMessage(){ return msg; } }