code: public static ByteBuffer[] getWrappedByteBuffers(WsByteBuffer wsbuffers[]) {
          // Create the buffer array to return.
          ByteBuffer buffers[] = new ByteBuffer[wsbuffers.length];
          boolean foundNullBuffer = false;
          int i = 0;
          // Loop through each buffer of the input array.
          for (i = 0; i < wsbuffers.length; i++) {
              if (wsbuffers[i] != null) {
                  // Populate the return buffer array with the wrapped buffers of the input array.
                  buffers[i] = wsbuffers[i].getWrappedByteBuffer();
              } else {
                  // Handle case where end entries of array are null.
                  foundNullBuffer = true;
                  break;
              }
          }
          // Check if the array needs to be shrunk down.
          if (foundNullBuffer) {
              // Need to shrink. Create temporary array to hold current contents.
              ByteBuffer tempBuffers[] = buffers;
              // Replace return buffer array with appropriately sized array.
              buffers = new ByteBuffer[i];
              for (int j = 0; j < i; j++) {
                  // Populate the return buffer with only non null entries.
                  buffers[j] = tempBuffers[j];
              }
          }
          return buffers;
      }
docs: Return the underlying ByteBuffer array associated with the input WsByteBuffer array.
  
  @param wsbuffers
  @return ByteBuffer[]