public static void main(String[] args) throws IOException {
BASE64Encoder encoder = new BASE64Encoder();
System.out.println("Please input user name:");
String username= new BufferedReader(new InputStreamReader(System.in)).readLine();
System.out.println(encoder.encode(username.getBytes()));
System.out.println("please input password:");
String password=new BufferedReader(new InputStreamReader(System.in)).readLine();
System.out.println(encoder.encode(password.getBytes()));
}
原文地址:http://5618698.blog.51cto.com/5608698/1632039