code: public static void splitKeyVal(byte[] utf, int start, int length, 
                                   BytesWritable key, BytesWritable val, int splitPos,
                                   int separatorLength) throws IOException {
      if (splitPos<start || splitPos >= (start+length))
        throw new IllegalArgumentException("splitPos must be in the range " +
                                           "[" + start + ", " + (start+length) + "]: " + splitPos);
      int keyLen = (splitPos-start);
      byte [] keyBytes = new byte[keyLen];
      System.arraycopy(utf, start, keyBytes, 0, keyLen);
      int valLen = (start+length)-splitPos-separatorLength;
      byte [] valBytes = new byte[valLen];
      System.arraycopy(utf, splitPos+separatorLength, valBytes, 0, valLen);
      key.set(keyBytes, 0, keyBytes.length);
      val.set(valBytes, 0, valBytes.length);
    }
docs: split a UTF-8 byte array into key and value
  assuming that the delimilator is at splitpos.
  @param utf utf-8 encoded string
  @param start starting offset
  @param length no. of bytes
  @param key contains key upon the method is returned
  @param val contains value upon the method is returned
  @param splitPos the split pos
  @param separatorLength the length of the separator between key and value
  @throws IOException