Find an entry given its name in the cache and return the associated String. @param name The name to find @param malformedInputAction Action to take if a malformed input is encountered @param unmappableCharacterAction Action to take if an unmappable character is encountered
(ByteChunk name, CodingErrorAction malformedInputAction,
CodingErrorAction unmappableCharacterAction)
| 544 | * @return the corresponding value |
| 545 | */ |
| 546 | protected static String find(ByteChunk name, CodingErrorAction malformedInputAction, |
| 547 | CodingErrorAction unmappableCharacterAction) { |
| 548 | int pos = findClosest(name, bcCache, bcCache.length); |
| 549 | if ((pos < 0) || (compare(name, bcCache[pos].name) != 0) || !(name.getCharset().equals(bcCache[pos].charset)) || |
| 550 | !malformedInputAction.equals(bcCache[pos].malformedInputAction) || |
| 551 | !unmappableCharacterAction.equals(bcCache[pos].unmappableCharacterAction)) { |
| 552 | return null; |
| 553 | } else { |
| 554 | return bcCache[pos].value; |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | |
| 559 | /** |