Yes the same thing happened to me when I first saw the flip() method, I had no idea really what it did. But I eventually figured it out after asking people 
Basically, it flips from writing to reading.
So you have this example code:
Buffer buffer = new Buffer();
buffer.putInt(100); // Integer consists of 4 bytes, therefore the position of the internal byte array is now at 4
System.out.println(buffer.getInt()); // Begin reading from the 4th byte onward, because the position is still at 4 after writing. You are not reading at the correct position this is INCORRECT!
This will not print 100. Why? Because the buffer’s position is not set to the beginning.
This is what it should be:
Buffer buffer = new Buffer();
buffer.putInt(100); // Integer consists of 4 bytes, therefore the position of the internal byte array is now at 4
buffer.flip(); // Set the position back to 0. Set limit to 4 (old position)
System.out.println(buffer.getInt()); // Before this is read, the remainder() is 4. After this is read the remainder is 0, because the position is increased by 4 since you are reading an integer (4 bytes). You begin reading from 0 because the position was reset to 0 (which is where you wrote the integer 100, the first 4 bytes in the byte array)
Once you flip it, the position is set back to 0 (so you can start reading from the beginning instead of where the position was left off when you wrote the integer 100) and the limit becomes the position.
Then you can use the remainder() method to see how many more bytes can be read. Without flipping, there is no limit, and therefore the remainder will not be accurate.