Here you can find the source of getPasswordFromUserInfo(URI uri)
public static String getPasswordFromUserInfo(URI uri)
//package com.java2s; //License from project: Open Source License import java.net.URI; public class Main { public static String getPasswordFromUserInfo(URI uri) { String userInfo = uri.getUserInfo(); if (userInfo != null) { return userInfo.substring(userInfo.indexOf(":") + 1, userInfo.length());//from ww w. ja va2 s . c o m } else { return null; } } }