Buffer flip() method usage
Buffer can be used for both reading and writing. As follows:
public class NioTest {
public static void main(String[] args) {
// Allocate cache with memory size of 10
IntBuffer buffer = IntBuffer.allocate(10);
// Write data to buffer
for (int i = 0; i < 5; ++i) {
int randomNumber = new SecureRa ...
Posted by bb_xpress on Mon, 18 Oct 2021 20:55:54 -0700