Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1
-
None
-
None
Description
ReaderInputStream in its current form does not efficiently handle reading of small data chunks. #read(byte[] b, int off, int len) methods compacts encoderOut on every read operation, which is not very efficient if the chunks of data being read are smallish. This especially affects the #read() method, which currently reads one byte of data into a temporary byte array. Not to mention that allocation of a temporary byte array on each #read() method invocation leads to generation of unnecessary intermediate garbage on the heap.