コード例 #1
0
ファイル: EmailManager.java プロジェクト: Cauac/MailLibrary
 private ReceiveProtocol getIncommingProtocol(Socket s) throws IOException, ProtocolException {
   ReceiveProtocol protocol;
   if (info.getInProtocolType().equals("POP3")) {
     protocol = new POP3(s.getInputStream(), s.getOutputStream());
   } else {
     protocol = new IMAP(s.getInputStream(), s.getOutputStream());
   }
   return protocol;
 }