annotate src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelay.java @ 331:42fcc9419498

add error message, add lostParent case by fail to connectTo.
author oc
date Tue, 03 Feb 2015 12:31:48 +0900
parents 49762c621bd6
children b9e73589202c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
1 package jp.ac.u_ryukyu.treevnc;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
2
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
3 import java.io.UnsupportedEncodingException;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
4 import java.nio.ByteBuffer;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
5 import java.nio.ByteOrder;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
6 import com.glavsoft.rfb.encoding.EncodingType;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
7
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
8
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
9 public class CheckDelay {
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
10
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
11 private ByteBuffer msg;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
12
331
42fcc9419498 add error message, add lostParent case by fail to connectTo.
oc
parents: 236
diff changeset
13 public CheckDelay(int i, int j, int width, int height, long time, EncodingType checkDelay) {
236
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
14
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
15 msg = ByteBuffer.allocate(24).order(ByteOrder.BIG_ENDIAN);
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
16 msg.put((byte) 0); // FrameBufferUpdate
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
17 msg.put((byte) 0); // padding
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
18 msg.putShort((short) 1); // number of rectangle
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
19 msg.putShort((short) i);
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
20 msg.putShort((short) j);
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
21 msg.putShort((short) width);
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
22 msg.putShort((short) height);
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
23 msg.putInt(checkDelay.getId());
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
24 msg.putLong(time);
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
25 msg.flip();
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
26
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
27 }
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
28
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
29 public ByteBuffer getMessage(){
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
30 return msg;
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
31 }
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
32
49762c621bd6 forget add CheckDelay.java
oc
parents:
diff changeset
33 }