I believe that you are mistaken in your assumption that you should use NIO2 to increase. Please listen!
NIO2 is a non-blocking version of Java IO. This means that itβs easier to write high-performance io in NIO2 because you donβt have to start and manage threads, because most of your threads just wait for I / O. Multi-threaded programming is complicated, so everything that makes the task easier is a function, that's why NIO2.
However, as a library user, how difficult it is to write a library is not your problem. Modern JVMs can handle many threads, and the old io API should be powerful when used by experienced programmers. Since you are a library user, I suggest you find the fastest library.
Apache's HTTPClient is a very popular library. I suggest that you contact the experts on this subject and ask them your questions about performance. I am not an expert in this field, so I am not telling you that HTTPClient is the best, I am just saying so as not to count it, and that talking to people HTTPClient would be a good place to start.
Luck
source share