More charset-related cleanup/optimization.
This patch adds a Charsets class that lets us avoid a hash lookup and an extra
level of method call indirection when calling String.getBytes or "new String"
for a well-known guaranteed charset. It also fixes callers to take advantage.
This also adds a special case to "new String" for the UTF-8 charset to avoid
needless duplication if we guessed the correct buffer size (which we will for
input that happens to be US-ASCII too).
The ModifiedUtf8 class gives a more meaningful name for Utils.convertUTF8WithBuf.
This also removes a dead link and un-tinyurl'ed another.
Change-Id: I02712f53dee16feb3b1db2c14536dc055126cd04
tree: 6710c176dbfa532271b972b5311159d2fc5f1283
- src/