Java URI to Password getPasswordFromUserInfo(URI uri)

Here you can find the source of getPasswordFromUserInfo(URI uri)

Description

get Password From User Info

License

Open Source License

Declaration

public static String getPasswordFromUserInfo(URI uri) 

Method Source Code

//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;
        }
    }
}

Related

  1. getPassword(final URI uri)
  2. getPassword(URI uri)