Skip to content
Advertisement

Tag: bytebuffer

Growing ByteBuffer

Has anyone has ever seen an implementation of java.nio.ByteBuffer that will grow dynamically if a putX() call overruns the capacity? The reason I want to do it this way is twofold: I don’t know how much space I need ahead of time. I’d rather not do a new ByteBuffer.allocate() then a bulk put() every time I run out of space.

Advertisement