ByteBuffer Demo

ByteBuffer Demo

This demo shows how a ByteBuffer and its flip() and compact() methods work.

This code belongs to this article: https://www.happycoders.eu/java/bytebuffer-flip-compact/