docs: public static int adjustBufferForJSSE(WsByteBuffer buffer, int maxBufferSize) {
          int limit = -1;
          if (null != buffer) {
              int size = buffer.remaining();
              if (maxBufferSize < size) {
                  limit = buffer.limit();
                  // Adjust the limit to the max allowed.
                  int overFlow = size - maxBufferSize;
                  buffer.limit(limit - overFlow);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "adjustBufferForJSSE: from " + limit + " to " + buffer.limit());
                  }
              }
          }
          return limit;
      }