/** * Sets the input buffer the {@code Deflater} will use to extract uncompressed bytes for later * compression. */ public synchronized void setInput(byte[] buf, int offset, int byteCount) { checkOpen(); Arrays.checkOffsetAndCount(buf.length, offset, byteCount); inLength = byteCount; inRead = 0; if (inputBuffer == null) { setLevelsImpl(compressLevel, strategy, streamHandle); } inputBuffer = buf; setInputImpl(buf, offset, byteCount, streamHandle); }