boolean requestX11Forwarding ( boolean singleconnection , String protocol , String cookie , int screen ) throws SshException { ByteArrayWriter request = new ByteArrayWriter ( ) ; try { request . writeBoolean ( singleconnection ) ; request . writeString ( protocol ) ; request . writeString ( cookie ) ; request . writeInt ( screen ) ; return sendRequest ( "x11-req" , true , request . toByteArray ( ) ) ; } catch ( IOException ex ) { throw new SshException ( ex , SshException . INTERNAL_ERROR ) ; } finally { try { request . close ( ) ; } catch ( IOException e ) { } } }
Send a request for X Forwarding .