You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the Servlet spec would expose zero-copy file transfer operations, so that files can be written to the network socket without involving the CPU. In Java, zero-copy is exposed through the FileChannel::transferTo methods, but combing this channel-based API with the Servlet spec seems impossible.
For instance, this could take the form of a long transfer(Path file, long pos, long count) method on either ServletResponse or ServletOutputStream, that takes the file path, position and byte count, and returns the bytes written.
The text was updated successfully, but these errors were encountered:
It would be nice if the Servlet spec would expose zero-copy file transfer operations, so that files can be written to the network socket without involving the CPU. In Java, zero-copy is exposed through the
FileChannel::transferTo
methods, but combing this channel-based API with the Servlet spec seems impossible.For instance, this could take the form of a
long transfer(Path file, long pos, long count)
method on eitherServletResponse
orServletOutputStream
, that takes the file path, position and byte count, and returns the bytes written.The text was updated successfully, but these errors were encountered: