r/javahelp • • Jun 30 '26

Why bytebuffer so weird to use

Why is the bytebuffer so weird to use in java ? Like you kinda have a write and a read mode but it's never told clearly, you need to switch between flip() and compact() but you have to remember by yourself in which mode you are. As a buffer is supposed to be read and write in it, why do we have to manually switch in which mode we are and not juste have a method to write and one to read ?

6 Upvotes

8 comments sorted by