1 57 58 package org.apache.soap.transport.smtp; 59 60 65 public class SMTPUtils { 66 77 public static String getAddressFromAddressHeader (String header) { 78 int ltIndex = header.indexOf ('<'); 80 if (ltIndex != -1) { 81 String rest = header.substring (ltIndex + 1); 82 int rtIndex = rest.indexOf ('>'); 83 if (rtIndex != -1) { 84 return rest.substring (0, rtIndex); 85 } else { 86 return null; } 88 } else { 89 return header; 90 } 91 } 92 } 93 | Popular Tags |