Code example for PushbackInputStream

Methods: read, unread

0
        if (len == -1) {
            return; 
        } 
        wrap.unread(arr, 0, len);
        if (arr[0] == 0x1f && arr[1] == -117) {
            wrap = new PushbackInputStream(new GZIPInputStream(wrap), 32);
            len = wrap.read(arr);
            if (len == -1) {
                return; 
            } 
            wrap.unread(arr, 0, len);
        } 
         
        if (arr[0] == '<' &&
            arr[1] == '?' &&
            arr[2] == 'x' &&
            arr[3] == 'm' &&
            arr[4] == 'l'
        ) { 
            is = wrap;
        } else {