code: public final int read() throws IOException {
          final int c = super.read();
          boolean doUnfold = false;
          for (char[] pattern : patterns) {
              if (c == pattern[0]) {
                  doUnfold = true;
                  break;
              }
          }
          if (!doUnfold) {
              return c;
          } else {
              unread(c);
          }
  
          unfold();
  
          return super.read();
      }
docs: {@inheritDoc}