Java URI to Password getPassword(URI uri)

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

Description

get Password

License

Apache License

Declaration

public static String getPassword(URI uri) 

Method Source Code


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

Related

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