in src/main/java/software/amazon/encryption/s3/internal/CipherInputStream.java [49:63]
public int read(byte buffer[], int off, int targetLength) throws IOException {
if (!readNextChunk()) {
return -1;
}
if (targetLength <= 0) {
return 0;
}
int length = maxPosition - currentPosition;
if (targetLength < length) {
length = targetLength;
}
System.arraycopy(outputBuffer, currentPosition, buffer, off, length);
currentPosition += length;
return length;
}