That is, you can call buffer.duplicate(); and then start calling put() methods on that.