code: public int setPos(final int pos) {
          final int oldpos = super.pos;
  
          int apos = pos;
          if (pos > super.count) {
              apos = super.count;
          } else if (pos < 0) {
              apos = 0;
          }
  
          super.pos = apos;
  
          return oldpos;
      }
docs: Set the current position in the stream.
  
  @param pos
  the position to move to in the stream. If pos indicates a
  position beyond the end of the stream, the position is move to
  the end of the stream instead. If pos is negative, the
  position is moved to the beginning of the stream instead.
  
  @return the previous position in the stream.