/** * Optimised lookup to find a method name and trailing space in a byte array. * @param buffer buffer containing ISO-8859-1 characters * @return A HttpMethod if a match or null if no easy match. */ public static HttpMethod lookAheadGet(ByteBuffer buffer) { if (buffer.hasArray()) return lookAheadGet(buffer.array(),buffer.arrayOffset()+buffer.position(),buffer.arrayOffset()+buffer.limit()); return CACHE.getBest(buffer,0,buffer.remaining()); }
/** * Optimised lookup to find a method name and trailing space in a byte array. * @param buffer buffer containing ISO-8859-1 characters * @return A HttpMethod if a match or null if no easy match. */ public static HttpMethod lookAheadGet(ByteBuffer buffer) { if (buffer.hasArray()) return lookAheadGet(buffer.array(),buffer.arrayOffset()+buffer.position(),buffer.arrayOffset()+buffer.limit()); return CACHE.getBest(buffer,0,buffer.remaining()); }
/** * Optimized lookup to find a method name and trailing space in a byte array. * @param buffer buffer containing ISO-8859-1 characters, it is not modified. * @return A HttpMethod if a match or null if no easy match. */ public static HttpMethod lookAheadGet(ByteBuffer buffer) { if (buffer.hasArray()) return lookAheadGet(buffer.array(),buffer.arrayOffset()+buffer.position(),buffer.arrayOffset()+buffer.limit()); int l = buffer.remaining(); if (l>=4) { HttpMethod m = CACHE.getBest(buffer,0,l); if (m!=null) { int ml = m.asString().length(); if (l>ml && buffer.get(buffer.position()+ml)==' ') return m; } } return null; }
/** * Optimized lookup to find a method name and trailing space in a byte array. * @param buffer buffer containing ISO-8859-1 characters, it is not modified. * @return A HttpMethod if a match or null if no easy match. */ public static HttpMethod lookAheadGet(ByteBuffer buffer) { if (buffer.hasArray()) return lookAheadGet(buffer.array(),buffer.arrayOffset()+buffer.position(),buffer.arrayOffset()+buffer.limit()); int l = buffer.remaining(); if (l>=4) { HttpMethod m = CACHE.getBest(buffer,0,l); if (m!=null) { int ml = m.asString().length(); if (l>ml && buffer.get(buffer.position()+ml)==' ') return m; } } return null; }
/** * Optimized lookup to find a method name and trailing space in a byte array. * @param buffer buffer containing ISO-8859-1 characters, it is not modified. * @return A HttpMethod if a match or null if no easy match. */ public static HttpMethod lookAheadGet(ByteBuffer buffer) { if (buffer.hasArray()) return lookAheadGet(buffer.array(),buffer.arrayOffset()+buffer.position(),buffer.arrayOffset()+buffer.limit()); int l = buffer.remaining(); if (l>=4) { HttpMethod m = CACHE.getBest(buffer,0,l); if (m!=null) { int ml = m.asString().length(); if (l>ml && buffer.get(buffer.position()+ml)==' ') return m; } } return null; }
/** * Optimized lookup to find a method name and trailing space in a byte array. * @param buffer buffer containing ISO-8859-1 characters, it is not modified. * @return A HttpMethod if a match or null if no easy match. */ public static HttpMethod lookAheadGet(ByteBuffer buffer) { if (buffer.hasArray()) return lookAheadGet(buffer.array(),buffer.arrayOffset()+buffer.position(),buffer.arrayOffset()+buffer.limit()); int l = buffer.remaining(); if (l>=4) { HttpMethod m = CACHE.getBest(buffer,0,l); if (m!=null) { int ml = m.asString().length(); if (l>ml && buffer.get(buffer.position()+ml)==' ') return m; } } return null; }
@Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { final Handler handler = handlers.getBest(baseRequest.getRequestURI()); if (handler != null) { handler.handle(target, baseRequest, request, response); } } }
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
while(i>=0) entry=prefix_map.getBest(path,0,i); if (entry==null) break;
Map.Entry<String,Branch[]> branches = _pathBranches.getBest(target,1,limit);
Map.Entry<String,Branch[]> branches = _pathBranches.getBest(target,1,limit);
Map.Entry<String,Branch[]> branches = _pathBranches.getBest(target,1,limit);
HttpHeader header = HttpHeader.CACHE.getBest(headerName.getBytes(),0,headerName.length()); for (String value : request.getHeaders().get(headerName))
HttpHeader header = HttpHeader.CACHE.getBest(headerName.getBytes(),0,headerName.length()); for (String value : request.getHeaders().get(headerName))