/** * Checks the parameter range. * * @param l The long integer to check to be in the range of an unsigned * long integer ({@value SIZE} bits). * @return {@code true} * @throws IllegalArgumentException If {@code l} is less than * {@link #MIN_VALUE} or greater than {@link #MAX_VALUE}. */ public static boolean check(final long l) { return check(l, "Long integer out of range", null); } }
final void setRawCompressedSize(final long csize) { assert ULong.check(csize); this.csize = csize; }
final void setRawSize(final long size) { assert ULong.check(size); this.size = size; }
final void setRawOffset(final long offset) { assert ULong.check(offset); this.offset = offset; }
/** * Sets the compressed size of this entry. * * @param csize The Compressed Size. * @throws IllegalArgumentException If {@code csize} is not in the * range from {@code 0} to {@link ULong#MAX_VALUE} * ({@value de.schlichtherle.truezip.zip.ULong#MAX_VALUE}). * @see #getCompressedSize */ public final void setCompressedSize(final long csize) { if (UNKNOWN != csize) ULong.check(csize, name, "Compressed Size out of range"); this.csize = csize; }
/** * Sets the uncompressed size of this entry. * * @param size The (Uncompressed) Size. * @throws IllegalArgumentException If {@code size} is not in the * range from {@code 0} to {@link ULong#MAX_VALUE} * ({@value de.schlichtherle.truezip.zip.ULong#MAX_VALUE}). * @see #getCompressedSize */ public final void setSize(final long size) { if (UNKNOWN != size) ULong.check(size, name, "Uncompressed Size out of range"); this.size = size; }