Skip to content

Instantly share code, notes, and snippets.

@trustin
Created July 23, 2012 07:07
Show Gist options
  • Save trustin/3162371 to your computer and use it in GitHub Desktop.
Save trustin/3162371 to your computer and use it in GitHub Desktop.
// No more dynamicBuffer() - use buffer().
ByteBuf buf = ByteBuf.buffer();
// Increase the capacity of the buffer.
buf.capacity(1024);
...
// Decrease the capacity of the buffer (the last 512 bytes are deleted.)
buf.capacity(512);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment