Code example for InterruptedIOException

0
        mOutputStream = Utils.checkNotNull(outputStream);
    } 
 
    @Override 
    public void write(int oneByte) throws IOException {
        if (mIsInterrupted) throw new InterruptedIOException();
        mOutputStream.write(oneByte);
    } 
 
    @Override 
    public void write(byte[] buffer, int offset, int count) throws IOException {
        int end = offset + count;
        while (offset < end) {
            if (mIsInterrupted) throw new InterruptedIOException();
            int bytesCount = Math.min(MAX_WRITE_BYTES, end - offset);
            mOutputStream.write(buffer, offset, bytesCount);
            offset += bytesCount;
        } 
    } 
 
Connect your IDE to all the code out there  Get Codota for Java