code: public static void flipBuffersToMark(WsByteBuffer buffers[], int mark, int markBufferIndex) {
          WsByteBuffer buffer = null;
          // Verify the input buffer array is not null.
          if (buffers != null) {
              // Loop through all the buffers in the array.
              for (int i = 0; i < buffers.length; i++) {
                  // Extract each buffer.
                  buffer = buffers[i];
                  // Verify the buffer is non null.
                  if (buffer != null) {
                      if (i == markBufferIndex && mark != 0) {
                          // Found the "marked" buffer.
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "mark is " + mark);
                          }
                          buffer.limit(buffer.position());
                          buffer.position(mark);
                      } else {
                          // Not the "marked" buffer, so flip it.
                          buffer.flip();
                      }
                  }
              }
          }
      }
docs: Sort of like Buffer.flip(). The limit is set to the postion,
  but the position is set differently. If the index of the buffer
  is markIndex and the mark is not zero, then the position will of
  that buffer will be set to mark. All other buffers will be flipped.
  
  @param buffers buffers on which flip to mark
  @param mark the mark to be set on the indexed buffer in the array
  @param markBufferIndex the index into the array where the mark should be placed