Mercurial > hg > Applications > TreeVNC
view src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelay.java @ 542:6051d8fb1f36
debug fix
author | e165729 <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 14 Nov 2019 16:48:14 +0900 |
parents | b9e73589202c |
children |
line wrap: on
line source
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) { msg = ByteBuffer.allocate(24).order(ByteOrder.BIG_ENDIAN); checkDelay(msg, (short) i, (short) j, (short) width, (short) height, time, checkDelay); msg.flip(); } public static void checkDelay(ByteBuffer msg, int i, int j, int width, int height, long time, EncodingType checkDelay) { 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); } public ByteBuffer getMessage(){ return msg; } }