Similar to ObjectInputStream, use JLA.countPositives and 
JLA.inflateBytesToChars to speed up readUTF

-------------

Commit messages:
 - suggestion from @liach
 - optimize for ascii
 - only allocate the char array if we have non-ascii
 - optimize DataOutputStream::readUTF

Changes: https://git.openjdk.org/jdk/pull/20903/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20903&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8340232
  Stats: 42 lines in 1 file changed: 28 ins; 2 del; 12 mod
  Patch: https://git.openjdk.org/jdk/pull/20903.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20903/head:pull/20903

PR: https://git.openjdk.org/jdk/pull/20903

Reply via email to