Advertisement
Guest User

Untitled

a guest
Mar 12th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. public void userSignUp(String credentials){
  2.         String[] received = simpleprotocol.decodeMessage(credentials);
  3.         String username = received[1];
  4.         String password = received[2];
  5.        
  6.        
  7.             if(!(userDetails.containsKey(username))){
  8.                 if(username.length() >=5 && username.length() <=20){
  9.                     if(password.length() >= 8 && password.length() <=32){
  10.                             userDetails.put(username, password);
  11.                     }
  12.                 }
  13.             }
  14.             try{
  15.                 socket.close();
  16.             }catch (IOException e){
  17.                 e.printStackTrace();
  18.             }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement