code: public static void getBufferLimits(WsByteBuffer[] buffers, int[] limits) {
          // Double check that the parameters are non null.
          if ((buffers != null) && (limits != null)) {
              // Loop through the buffers.
              // In case of errant parameters, protect from array out of bounds.
              for (int i = 0; i < buffers.length && i < limits.length; i++) {
                  // Double check for null buffers.
                  if (buffers[i] != null) {
                      // Save the limit.
                      limits[i] = buffers[i].limit();
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "getBufferLimits: buffer[" + i + "] limit of " + limits[i]);
                      }
                  } else {
                      // When buffer is null, save a limit of 0.
                      limits[i] = 0;
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "getBufferLimits: null buffer[" + i + "] limit of " + limits[i]);
                      }
                  }
              }
          }
      }
docs: Assign an array of limits associated with the passed in buffer array.
  
  @param buffers
  @param limits