private int keyToLevel(String key){
  String[] token=key.split("/");
  return (token.length - 1);
}

private int keyToLevel ( String key ) { String [ ] token = key . split ( "/" ) ; return ( token . length - 1 ) ; }
given a key , find the level
