code: final int calculateOutNetBufSize(int plaintextBytes, int numBuffers) {
          // Assuming a max of one frame per component in a composite buffer.
          long maxOverhead = (long) Conscrypt.maxSealOverhead(getWrappedEngine()) * numBuffers;
          // TODO(nmittler): update this to use MAX_ENCRYPTED_PACKET_LENGTH instead of Integer.MAX_VALUE
          return (int) min(Integer.MAX_VALUE, plaintextBytes + maxOverhead);
      }
docs: Calculates the maximum size of the encrypted output buffer required to wrap the given plaintext bytes. Assumes
  as a worst case that there is one TLS record per buffer.
  
  @param plaintextBytes the number of plaintext bytes to be wrapped.
  @param numBuffers the number of buffers that the plaintext bytes are spread across.
  @return the maximum size of the encrypted output buffer required for the wrap operation.