@Override int updateInternal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset, int maximumLen) throws ShortBufferException { checkInitialization(); if (buf == null) { throw new IllegalStateException("Cipher not initialized"); } ArrayUtils.checkOffsetAndCount(input.length, inputOffset, inputLen); if (inputLen > 0) { expand(inputLen); System.arraycopy(input, inputOffset, buf, this.bufCount, inputLen); this.bufCount += inputLen; } return 0; }
@Override int updateInternal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset, int maximumLen) throws ShortBufferException { checkInitialization(); if (buf == null) { throw new IllegalStateException("Cipher not initialized"); } ArrayUtils.checkOffsetAndCount(input.length, inputOffset, inputLen); if (inputLen > 0) { expand(inputLen); System.arraycopy(input, inputOffset, buf, this.bufCount, inputLen); this.bufCount += inputLen; } return 0; }
/** * Method acts as described in spec for superclass. * @see java.io.OutputStream#write(byte[],int,int) */ @Override public void write(byte[] buf, int offset, int byteCount) throws IOException { Platform.blockGuardOnNetwork(); checkOpen(); ArrayUtils.checkOffsetAndCount(buf.length, offset, byteCount); if (byteCount == 0) { return; } synchronized (writeLock) { synchronized (ssl) { if (state == STATE_CLOSED) { throw new SocketException("socket is closed"); } if (DBG_STATE) { assertReadableOrWriteableState(); } } ssl.write(Platform.getFileDescriptor(socket), buf, offset, byteCount, writeTimeoutMilliseconds); synchronized (ssl) { if (state == STATE_CLOSED) { throw new SocketException("socket is closed"); } } } }
/** * Method acts as described in spec for superclass. * @see java.io.OutputStream#write(byte[],int,int) */ @Override public void write(byte[] buf, int offset, int byteCount) throws IOException { Platform.blockGuardOnNetwork(); checkOpen(); ArrayUtils.checkOffsetAndCount(buf.length, offset, byteCount); if (byteCount == 0) { return; } synchronized (writeLock) { synchronized (ssl) { if (state == STATE_CLOSED) { throw new SocketException("socket is closed"); } if (DBG_STATE) { assertReadableOrWriteableState(); } } ssl.write(Platform.getFileDescriptor(socket), buf, offset, byteCount, writeTimeoutMilliseconds); synchronized (ssl) { if (state == STATE_CLOSED) { throw new SocketException("socket is closed"); } } } }
ArrayUtils.checkOffsetAndCount(buf.length, offset, byteCount); if (byteCount == 0) { return 0;
ArrayUtils.checkOffsetAndCount(buf.length, offset, byteCount); if (byteCount == 0) { return 0;