out.write(buffer);
} else if (message instanceof ClientCursorStatus) {
ClientCursorStatus clientCursorStatus = (ClientCursorStatus) message;
byte[] securityTokenAsByte = clientCursorStatus.getPublicSID().getBytes();
Integer lengthSecurityToken = securityTokenAsByte.length;
Integer frameSize = 4 * 8 + lengthSecurityToken;
IoBuffer buffer = IoBuffer.allocate(frameSize, false);
//mode is 6
buffer.put(this.convertIntToByteArray(clientCursorStatus.getMode()));// 4 Byte
buffer.put(this.convertIntToByteArray(ClientConnectionBean.getFrameNumber()));//4 Byte
buffer.put(this.convertIntToByteArray(lengthSecurityToken));//4 Byte
buffer.put(this.convertIntToByteArray(clientCursorStatus.getX()));//4 Byte => X-Position
buffer.put(this.convertIntToByteArray(clientCursorStatus.getY()));//4 Byte => Y-Position
buffer.put(this.convertIntToByteArray(0));//4 Byte => Empty
buffer.put(this.convertIntToByteArray(0));//4 Byte => Empty
buffer.put(this.convertIntToByteArray(0));//4 Byte => this data is not needed
buffer.put(securityTokenAsByte);//32 Byte usually