@Override
    public void write(byte[] b, int off, int len) throws IOException {
        if (b.length == 0)
            return;
        fos().write(b, off, len);
        currFileBytesWritten += len;
        totalBytesWritten += len;
    }
{@inheritDoc}

This method would block as necessary if running out of disk space.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/MultiFileOutputStream.java