MCPcopy Index your code
hub / github.com/apache/tomcat / findByte

Method findByte

java/org/apache/tomcat/util/buf/ByteChunk.java:965–974  ·  view source on GitHub ↗

Returns the first instance of the given byte in the byte array between the specified start and end. @param bytes The byte array to search @param start The point to start searching from in the byte array @param end The point to stop searching in the byte array @param b The byte to search for

(byte[] bytes, int start, int end, byte b)

Source from the content-addressed store, hash-verified

963 * @return The position of the first instance of the byte or -1 if the byte is not found.
964 */
965 public static int findByte(byte[] bytes, int start, int end, byte b) {
966 int offset = start;
967 while (offset < end) {
968 if (bytes[offset] == b) {
969 return offset;
970 }
971 offset++;
972 }
973 return -1;
974 }
975
976
977 /**

Callers 2

testFindByteMethod · 0.95
convertMethod · 0.95

Calls

no outgoing calls

Tested by 1

testFindByteMethod · 0.76