JDK-8067661 : Add more efficient transferTo implementations to various input streams
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2014-12-16
  • Updated: 2019-07-11
  • Resolved: 2019-07-11
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
JDK-8066867 provides a basic implementation that transfers bytes from the input stream to a given output stream. Input streams can override this method to provide a more efficient transferTo implementation, the most obvious being ByteArrayInputStream. There are possibly others.
Comments
JDK-8180451 implemented transferTo() for ByteArrayInputStream. The only other InputStream subclass in java.io for which a more performant override appears possible is StringBufferInputStream but it is deprecated so this is probably not worth doing. Resolving as a duplicate.
11-07-2019