The maximum size of each chunk, in bytes.

@param nPartSize
New value. Must be &gt; 0.
@return this for chaining
429867
@Nonnull
  public FineUploader5Chunking setPartSize (@Nonnegative final long nPartSize)
  {
    ValueEnforcer.isGT0 (nPartSize, "PartSize");
    m_nChunkingPartSize = nPartSize;
    return this;
  }
1368592
public static WsByteBuffer allocateByteBuffer(int size, boolean allocateDirect) {
        WsByteBuffer newBuffer = null;
        // Allocate based on the input parameter.
        if (allocateDirect) {
            newBuffer = ChannelFrameworkFactory.getBufferManager().allocateDirect(size);
        } else {
            newBuffer = ChannelFrameworkFactory.getBufferManager().allocate(size);
        }
        // Shift the limit to the capacity to maximize the space available in the buffer.
        newBuffer.limit(newBuffer.capacity());
        return newBuffer;
    }
1124607
public static int bestBufferSize( long fileSize ) {
        assert fileSize >= 0;
        if (fileSize < TINY_FILE_SIZE) {
            return (int)fileSize + 2;
        }
        if (fileSize < SMALL_FILE_SIZE) {
            return TINY_BUFFER_SIZE;
        }
        if (fileSize < MEDIUM_FILE_SIZE) {
            return SMALL_BUFFER_SIZE;
        }
        if (fileSize < LARGE_SIZE) {
            return MEDIUM_BUFFER_SIZE;
        }
        return LARGE_BUFFER_SIZE;
    }
833090
@Nonnull
  public FineUploaderBasic setMinSizeLimit (@Nonnegative final int nMinSizeLimit)
  {
    ValueEnforcer.isGE0 (nMinSizeLimit, "MinSizeLimit");
    m_nValidationMinSizeLimit = nMinSizeLimit;
    return this;
  }
369081
private static int[] calculateMultipartSize(long size)
    throws InvalidArgumentException {
    if (size > MAX_OBJECT_SIZE) {
      throw new InvalidArgumentException("size " + size + " is greater than allowed size 5TiB");
    }

    double partSize = Math.ceil((double) size / MAX_MULTIPART_COUNT);
    partSize = Math.ceil(partSize / MIN_MULTIPART_SIZE) * MIN_MULTIPART_SIZE;

    double partCount = Math.ceil(size / partSize);

    double lastPartSize = partSize - (partSize * partCount - size);
    if (lastPartSize == 0.0) {
      lastPartSize = partSize;
    }

    return new int[] { (int) partSize, (int) partCount, (int) lastPartSize };
  }
456236
public ByteBuffer readToByteBuffer(int max) throws IOException {
        Validate.isTrue(max >= 0, "maxSize must be 0 (unlimited) or larger");
        final boolean localCapped = max > 0; // still possibly capped in total stream
        final int bufferSize = localCapped && max < DefaultSize ? max : DefaultSize;
        final byte[] readBuffer = new byte[bufferSize];
        final ByteArrayOutputStream outStream = new ByteArrayOutputStream(bufferSize);

        int read;
        int remaining = max;

        while (true) {
            read = read(readBuffer);
            if (read == -1) break;
            if (localCapped) { // this local byteBuffer cap may be smaller than the overall maxSize (like when reading first bytes)
                if (read >= remaining) {
                    outStream.write(readBuffer, 0, remaining);
                    break;
                }
                remaining -= read;
            }
            outStream.write(readBuffer, 0, read);
        }
        return ByteBuffer.wrap(outStream.toByteArray());
    }
1367480
@Nonnull
  public FineUploader5Validation setImageMaxHeight (@Nonnegative final int nImageMaxHeight)
  {
    ValueEnforcer.isGE0 (nImageMaxHeight, "ImageMaxHeight");
    m_nValidationImageMaxHeight = nImageMaxHeight;
    return this;
  }
727458
static Map<String, Object> sizePayload(final Object min, final Object max) {
		if (min == null || max == null) {
			return null;
		}
		Map<String, Object> payload = new LinkedHashMap<>();
		payload.put("min", min);
		payload.put("max", max);
		payload.put("message", MSG_PREFIX + VALIDATORS.get(Size.class));
		return payload;
	}
359243
@SuppressWarnings("unchecked")
    protected final void ensureCapacity(long targetSize) {
        long capacity = capacity();
        if (targetSize > capacity) {
            inflateSpine();
            for (int i=spineIndex+1; targetSize > capacity; i++) {
                if (i >= spine.length) {
                    int newSpineSize = spine.length * 2;
                    spine = Arrays.copyOf(spine, newSpineSize);
                    priorElementCount = Arrays.copyOf(priorElementCount, newSpineSize);
                }
                int nextChunkSize = chunkSize(i);
                spine[i] = (E[]) new Object[nextChunkSize];
                priorElementCount[i] = priorElementCount[i-1] + spine[i-1].length;
                capacity += nextChunkSize;
            }
        }
    }
440412
public static INDArray max(INDArray x, INDArray y, INDArray z, int... dimensions) {
        if(dimensions == null || dimensions.length == 0) {
            validateShapesNoDimCase(x,y,z);
            return Nd4j.getExecutioner().exec(new OldMax(x,y,z));
        }


        return Nd4j.getExecutioner().exec(new BroadcastMax(x,y,z,dimensions));
    }
173746
public function chunkSize($chunkSize = null)
    {
        if (!func_num_args()) {
            return $this->_chunkSize;
        }
        $this->_chunkSize = (int) $chunkSize;
        return $this;
    }
1126294
public static LinkedBuffer allocate(int size, LinkedBuffer previous)
    {
        if (size < MIN_BUFFER_SIZE)
            throw new IllegalArgumentException(MIN_BUFFER_SIZE + " is the minimum buffer size.");

        return new LinkedBuffer(size, previous);
    }
10238
protected int chooseShrinkCapacity(int size, double minLoad, double maxLoad) {
    return nextPrime(Math.max(size+1, (int) ((4*size / (minLoad+3*maxLoad)))));
  }
546673
public Cell<C,T> maxSize (float size) {
		maxWidth = new FixedValue<C, T>(layout.toolkit,size);
		maxHeight = new FixedValue<C, T>(layout.toolkit,size);
		return this;
	}
62705
public int size() {
		writeLock.lock();
		try {
			if (this.size < 0) {
				this.size = 0;
				for (LinkedHashMap<String, String> value : this.values()) {
					this.size += value.size();
				}
			}
		} finally {
			writeLock.unlock();
		}
		return this.size;
	}
460837
private int getMaxStringSize() {
    Iced<?> maxSize = DKV.getGet(Key.make(WriterDelegate.class.getCanonicalName() + "_maxStringSize"));
    return (maxSize instanceof IcedInt) ? ((IcedInt) maxSize)._val : MAX_STR_LEN;
  }
917698
public int getBatchSize()
    {
        if (isBatch())
        {
            String batchSize = getProperty(PersistenceProperties.KUNDERA_BATCH_SIZE);
            int batch_Size = Integer.valueOf(batchSize);
            if (batch_Size == 0)
            {
                throw new IllegalArgumentException("kundera.batch.size property must be numeric and > 0");
            }
            return batch_Size;
        }

        return 0;
    }