public QueryFilter withQuery ( String query ) { try { String encodedQuery = urlEncode ( query ) ; parameters . put ( KEY_QUERY , encodedQuery ) ; return this ; } catch ( UnsupportedEncodingException ex ) { //"Every implementation of the Java platform is required to support the following standard charsets [...]: UTF-8" //cf. https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html throw new IllegalStateException ( "UTF-8 encoding not supported by current Java platform implementation." , ex ) ; } }
Filter by a query