Returns the length of the original buffer. Note: The length in bytes may be different from the length in chars. @return the length
()
| 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 |