@Test public void testDataTypes() throws Buffer.BufferException { // bool assertEquals(handyBuf.putBoolean(true).readBoolean(), true); // byte assertEquals(handyBuf.putByte((byte) 10).readByte(), (byte) 10); // byte array assertArrayEquals(handyBuf.putBytes("some string".getBytes()).readBytes(), "some string".getBytes()); // mpint BigInteger bi = new BigInteger("1111111111111111111111111111111"); assertEquals(handyBuf.putMPInt(bi).readMPInt(), bi); // string assertEquals(handyBuf.putString("some string").readString(), "some string"); // uint32 assertEquals(handyBuf.putUInt32(0xffffffffL).readUInt32(), 0xffffffffL); }
@Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, TransportException { sendChannelRequest( "x11-req", true, new Buffer.PlainBuffer() .putBoolean(false) .putString(authProto) .putString(authCookie) .putUInt32(screen) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, TransportException { sendChannelRequest( "x11-req", true, new Buffer.PlainBuffer() .putBoolean(false) .putString(authProto) .putString(authCookie) .putUInt32(screen) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }
@Override public void reqX11Forwarding(String authProto, String authCookie, int screen) throws ConnectionException, TransportException { sendChannelRequest( "x11-req", true, new Buffer.PlainBuffer() .putBoolean(false) .putString(authProto) .putString(authCookie) .putUInt32(screen) ).await(conn.getTimeoutMs(), TimeUnit.MILLISECONDS); }