Code example for InterruptedIOException

0
        } 
        final int v = this.buf[this.pos++] & 0xff;
        if (v != 0) {
            return v;
        } else { 
            throw new InterruptedIOException("Timeout");
        } 
    } 
 
    @Override 
    public int read(final byte b[], final int off, final int len) throws IOException {
        if (b == null) {
            throw new NullPointerException();
        } else if ((off < 0) || (off > b.length) || (len < 0) ||
               ((off + len) > b.length) || ((off + len) < 0)) {
            throw new IndexOutOfBoundsException("off: "+off+" len: "+len+" b.length: "+b.length);
        } 
        if (this.pos >= this.count) {
            return -1; 
        } 
        int chunk = len;