Mercurial > hg > Applications > TreeVNC
changeset 236:49762c621bd6
forget add CheckDelay.java
author | oc |
---|---|
date | Sat, 11 Oct 2014 14:13:16 +0900 |
parents | 15e66adbb8bb |
children | 0815ed7f54a7 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelay.java |
diffstat | 1 files changed, 34 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelay.java Sat Oct 11 14:13:16 2014 +0900 @@ -0,0 +1,34 @@ +package jp.ac.u_ryukyu.treevnc; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import com.glavsoft.rfb.encoding.EncodingType; + + +public class CheckDelay { + + private ByteBuffer msg; + + public CheckDelay(int i, int j, int width, int height, long time, + EncodingType checkDelay) throws UnsupportedEncodingException { + + msg = ByteBuffer.allocate(24).order(ByteOrder.BIG_ENDIAN); + 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(checkDelay.getId()); + msg.putLong(time); + msg.flip(); + + } + + public ByteBuffer getMessage(){ + return msg; + } + +}