Here you can find the source of getPassword(URI uri)
public static String getPassword(URI uri)
//package com.java2s; //License from project: Apache License import java.net.URI; public class Main { public static String getPassword(URI uri) { String userInfo = uri.getUserInfo(); if (userInfo != null) { return userInfo.split(":", 2)[1]; }/*from w w w . j a v a2s .c o m*/ return null; } }