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

Method getLength

java/org/apache/tomcat/util/buf/MessageBytes.java:360–375  ·  view source on GitHub ↗

Returns the length of the original buffer. Note: The length in bytes may be different from the length in chars. @return the length

()

Source from the content-addressed store, hash-verified

358 * @return the length
359 */
360 public int getLength() {
361 if (type == T_BYTES) {
362 return byteC.getLength();
363 }
364 if (type == T_CHARS) {
365 return charC.getLength();
366 }
367 if (type == T_STR) {
368 return strValue.length();
369 }
370 toString();
371 if (strValue == null) {
372 return 0;
373 }
374 return strValue.length();
375 }
376
377 // -------------------- equals --------------------
378

Callers

nothing calls this directly

Calls 3

toStringMethod · 0.95
lengthMethod · 0.80
getLengthMethod · 0.65

Tested by

no test coverage detected