I am trying to fetch the string after the third slash. But i don' know how to do it. I have used split but that's not what I want.
for(String obj2: listKey.getCommonPrefixes()){
Map<String, String> map = new HashMap<String, String>();
String[] id = obj2.split("/");
if (id.length > 3) {
String name = id[3];
map.put("id", name);
map.put("date", "null");
map.put("size", String.valueOf(obj2.length()));
keys.add(map);
}
}
id[3]
gives me only id[3]
but i want everything after the third slash? how can i do that?