- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ArrayList a =
new ArrayList<String>()
new ArrayList()
new ArrayList<Object>()
- Smart code suggestions by Codota
}
/** * Client interceptor to set HTTP headers to advertise that REST client can accept LZF encoding */ @Provider @ClientInterceptor @HeaderDecoratorPrecedence public class AcceptLZFClientInterceptor { /** * Set headers to advertise ability to accept LZF compression <p/> * Check if client response has HTTP header "Accept-Encoding" set: <p/> * <ul> <li>- If none, set header to "lzf", if has a header, add lzf to the list</li></ul> * @param ctx Client execution context * @return Response with headers appended * @throws Exception */ public ClientResponse execute(ClientExecutionContext ctx) throws Exception { String encoding = ctx.getRequest().getHeaders().getFirst(HttpHeaders.ACCEPT_ENCODING); if (encoding == null) { ctx.getRequest().header(HttpHeaders.ACCEPT_ENCODING, "lzf"); } else { if (!encoding.contains("lzf")) { encoding += ", lzf"; ctx.getRequest().header(HttpHeaders.ACCEPT_ENCODING, encoding); } } return ctx.proceed(); } }
@HeaderDecoratorPrecedence public class AcceptEncodingGZIPInterceptor implements ClientExecutionInterceptor
@HeaderDecoratorPrecedence @Deprecated public class AcceptEncodingGZIPInterceptor implements ClientExecutionInterceptor