code: public static SimplePosition parsePosition(String s) {
          String[] parts = s.split(":");
          int id = Integer.parseInt(parts[0]);
          long offset = Long.parseLong(parts[1]);
          int index = Integer.parseInt(parts[2]);
          
          if(parts.length == 3) {
              return new SimplePosition(id, offset, index, Clock.ZERO);
          }
          
          long[] values = new long[parts.length - 3];
          for(int i = 0; i < values.length; i++) {
              values[i] = Long.parseLong(parts[3+i]);
          }
          
          return new SimplePosition(id, offset, index, new Clock(values));
      }
docs: Parses a string representation of <tt>SimplePosition</tt> in the form of <tt>Id:Offset:Index:Clock</tt>.
  
  <p>
  For example, <tt>1:128956235:59272:12789234:12789257:12789305</tt> defines a position with <tt>Id=1</tt>,
  <tt>Offset=128956235</tt>, <tt>Index=59272</tt> and <tt>Clock=12789234:12789257:12789305</tt>.
  
  @param s - the string representation of a position.
  @throws <tt>NullPointerException</tt> if the string <tt>s</tt> is null.
  @throws <tt>NumberFormatException</tt> if the string <tt>s</tt> contains non-parsable <tt>int</tt> or <tt>long</tt>.