Mercurial > hg > Members > riono > TreeVNC_ja_comment
annotate src/main/java/jp/ac/u_ryukyu/treevnc/RequestSingleDisplayWidth.java @ 280:9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
author | oc |
---|---|
date | Sun, 11 Jan 2015 03:38:25 +0900 |
parents | |
children | ae7deb002b5f |
rev | line source |
---|---|
280
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
1 package jp.ac.u_ryukyu.treevnc; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
2 |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
3 import com.glavsoft.exceptions.TransportException; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
4 import com.glavsoft.rfb.client.ClientToServerMessage; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
5 import com.glavsoft.rfb.encoding.EncodingType; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
6 import com.glavsoft.transport.Writer; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
7 |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
8 import java.nio.ByteBuffer; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
9 import java.nio.ByteOrder; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
10 import java.util.LinkedList; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
11 |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
12 /** |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
13 * Created by OcBookPro on 15/01/10. |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
14 */ |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
15 public class RequestSingleDisplayWidth implements ClientToServerMessage { |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
16 |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
17 private short id; |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
18 |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
19 public RequestSingleDisplayWidth() { |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
20 } |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
21 |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
22 @Override |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
23 public void send(Writer writer) throws TransportException { |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
24 ByteBuffer out = ByteBuffer.allocate(2); |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
25 out.order(ByteOrder.BIG_ENDIAN); |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
26 out.put(REQUEST_SINGLE_DISPLAY_WIDTH); |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
27 out.put((byte)0); // padding |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
28 writer.write(out.array(), 0, out.position()); |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
29 writer.flush(); |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
30 } |
9c5874d0f37e
fix adjustHdSizeButton button, this button send REQUEST_SINGLE_DISPLAY_WIDTH
oc
parents:
diff
changeset
|
31 } |