break;
}
length = is.read(buf);
int availableBytes = is.available();
if (length <= 0 || finish || Thread.interrupted()) {
byte[] buf = new byte[availableBytes];
is.read(buf, 0, availableBytes);
if (availableBytes <= 0 || finish || Thread.interrupted()) {
os.write(buf, 0, length);
os.write(buf, 0, availableBytes);
if (autoflush) {
os.flush();