# HG changeset patch # User mir3636 # Date 1466076944 -32400 # Node ID eaf6dbcb42dc63021b6abbc1c4e08798efaa0de7 # Parent 2c7dcc6e59eba6b581cd3e8ba8b4019a0c7a6562 fix filename diff -r 2c7dcc6e59eb -r eaf6dbcb42dc src/main/java/jp/ac/u_ryukyu/treevnc/ChangeDesktopSize.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/ChangeDesktopSize.java Thu Jun 16 20:35:44 2016 +0900 @@ -0,0 +1,37 @@ +package jp.ac.u_ryukyu.treevnc; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +import com.glavsoft.rfb.encoding.EncodingType; + +public class ChangeDesktopSize { + + private ByteBuffer msg; + + public ChangeDesktopSize(int width, int height, + int x, int y, byte[] initData, EncodingType desktopSize, short id) { + msg = ByteBuffer.allocate(16+4+initData.length).order(ByteOrder.BIG_ENDIAN); + msg.put((byte) 0); // FrameBufferUpdate + msg.put((byte) 0); // padding + msg.putShort((short) 1); // number of rectangle + msg.putShort((short) id); + msg.putShort((short) 0); + msg.putShort((short) width); + msg.putShort((short) height); + msg.putShort((short) x); + msg.putShort((short) y); + msg.putInt(desktopSize.getId()); + msg.putInt(initData.length); + msg.put(initData); + + msg.flip(); + + } + + public ByteBuffer getMessage(){ + return msg; + } + + +} diff -r 2c7dcc6e59eb -r eaf6dbcb42dc src/main/java/jp/ac/u_ryukyu/treevnc/ChengeDesktopSize.java --- a/src/main/java/jp/ac/u_ryukyu/treevnc/ChengeDesktopSize.java Thu Jun 16 20:34:21 2016 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -package jp.ac.u_ryukyu.treevnc; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -import com.glavsoft.rfb.encoding.EncodingType; - -public class ChengeDesktopSize { - - private ByteBuffer msg; - - public ChengeDesktopSize(int width, int height, - EncodingType desktopSize, byte[] initData, short id) { - msg = ByteBuffer.allocate(16+4+initData.length).order(ByteOrder.BIG_ENDIAN); - msg.put((byte) 0); // FrameBufferUpdate - msg.put((byte) 0); // padding - msg.putShort((short) 1); // number of rectangle - msg.putShort((short) id); - msg.putShort((short) 0); - msg.putShort((short) width); - msg.putShort((short) height); - msg.putInt(desktopSize.getId()); - msg.putInt(initData.length); - msg.put(initData); - - msg.flip(); - - } - - public ByteBuffer getMessage(){ - return msg; - } - - -}