/** * Sets the data which should be compressed next. This should be only called when needsInput * indicates that more input is needed. The given byte array should not be changed, before * needsInput() returns true again. * * @param input the buffer containing the input data. * @param off the start of the data. * @param len the length of the data. * @exception IllegalStateException if the buffer was finished() or ended() or if previous input * is still pending. */ public void setInput(byte[] input, int off, int len) { if (input == null) throw new NullPointerException(); if (off < 0 || len < 0 || off > input.length - len) throw new ArrayIndexOutOfBoundsException(); engine.setInput(input, off, len); }