Originally posted by David Weitzman:
The need for flip() comes from the different ways a buffer's position and limit values are interpretted in the two different contexts buffers are typically used: as places to insert data and as sources from which data is read.
So flip() was introduced to save two methods: instead of having getReadPosition(), getReadLimit(), getWritePosition(), getWriteLimit(), we only have to deal with position() and limit(), but the semantics of both being state dependent.
An explanation, but not very convincing.