code: @Override
      public int read() throws IOException {
          int readByte = -1;
          while (currentState != null && (readByte = currentState.read(this)) == -1) {
              currentState = currentState.getNextState(this);
          }
          totalRead++;
          return readByte;
      }
docs: {@inheritDoc}