public void sendBinarySync ( Session session , InputStream inputStream ) throws IOException { if ( session == null ) { return ; } if ( inputStream == null ) { throw new IllegalArgumentException ( "inputStream must not be null" ) ; } log . debugf ( "Attempting to send binary data to client [%s]" , session . getId ( ) ) ; if ( session . isOpen ( ) ) { long size = new CopyStreamRunnable ( session , inputStream ) . copyInputToOutput ( ) ; log . debugf ( "Finished sending binary data to client [%s]: size=[%s]" , session . getId ( ) , size ) ; } return ; }
Sends binary data to a client synchronously .