private XMPPInputOutputStream maybeGetCompressionHandler ( ) { if ( compressionMethods != null ) { for ( XMPPInputOutputStream handler : compressionHandlers ) { if ( ! handler . isSupported ( ) ) continue ; String method = handler . getCompressionMethod ( ) ; if ( compressionMethods . contains ( method ) ) return handler ; } } return null ; }
Returns the compression handler that can be used for one compression methods offered by the server .