Note: you don’t have to do that if you call updateData() on the VertexBuffer.
Here is my general buffer handling approach:
VertexBuffer pos = ...
FloatBuffer pb = (FloatBuffer)pos.getData();
pb.rewind();
// do stuff with the buffer
pb.rewind();
pos.updateData(pb);
This way handles the case where you need to create a new buffer (say it grows or whatever) also.