Hi, Currently it is not possible to use ServletInputStream.read/ServletOutputStream.write methods with ByteBuffer. To enable such scenarios in Tomcat I would like to extend the Tomcat’s internal implementation (CoyoteInputStream/CoyoteOutputStream). I already did some refactoring in ByteChunk/CharChunk/SocketWrapperBase so that I can introduce read/write with ByteBuffer. I executed Autobahn test suite to check the performance impact after the refactoring and it showed no performance regression. If there are no objections I want to commit these changes in Tomcat 9 and Tomcat 8.5.x.
Best Regards, Violeta