docs: public static WsByteBuffer[] allocateByteBuffers(int requestedBufferSize,
                                                       long totalDataSize,
                                                       boolean allocateDirect,
                                                       boolean enforceRequestedSize) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.entry(tc, "allocateByteBuffers");
          }
  
          // Allocate the first buffer.
          WsByteBuffer firstBuffer = allocateByteBuffer(requestedBufferSize, allocateDirect);
          // Check if we are obligated to stick to the requested size.
          if (enforceRequestedSize) {
              firstBuffer.limit(requestedBufferSize);
          }
          // Note, allocation can result in a buffer larger than requested. Determine the
          // number of buffers to allocated based on the resulting actual size.
          int actualBufferSize = firstBuffer.limit();
          // if the actual size is the same as the requested size, then no need to force it
          boolean enforce = enforceRequestedSize;
          if (enforce && actualBufferSize == requestedBufferSize) {
              enforce = false;
          }
          int numBuffersToAllocate = (int) (totalDataSize / actualBufferSize);
          // Still need to account for a remainder.
          if ((totalDataSize % actualBufferSize) > 0) {
              numBuffersToAllocate++;
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "allocate: requestSize="
                           + requestedBufferSize + ", actualSize="
                           + actualBufferSize + ", totSize=" + totalDataSize
                           + ", numBufs=" + numBuffersToAllocate);
          }
          // Create the array of the determined size.
          WsByteBuffer newBuffers[] = new WsByteBuffer[numBuffersToAllocate];
          newBuffers[0] = firstBuffer;
          for (int i = 1; i < newBuffers.length; i++) {
              newBuffers[i] = allocateByteBuffer(requestedBufferSize, allocateDirect);
              // Check if we are obligated to stick to the requested size.
              if (enforce) {
                  newBuffers[i].limit(requestedBufferSize);
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.exit(tc, "allocateByteBuffers");
          }
          return newBuffers;
      }