@@ -0,0 +1,1508 @@
+package to.etc.util;%0A%0Aimport javax.annotation.*;%0A%0Afinal public class DbConnectionInfo %7B%0A%09private String%09m_hostname;%0A%0A%09private String%09m_sid;%0A%0A%09private String%09m_userid;%0A%0A%09private String%09m_password;%0A%0A%09private int%09%09m_port;%0A%0A%09public DbConnectionInfo(String hostname, int port, String sid, String userid, String password) %7B%0A%09%09m_hostname = hostname;%0A%09%09m_port = port;%0A%09%09m_sid = sid;%0A%09%09m_userid = userid;%0A%09%09m_password = password;%0A%09%7D%0A%0A%09public String getHostname() %7B%0A%09%09return m_hostname;%0A%09%7D%0A%0A%09public String getSid() %7B%0A%09%09return m_sid;%0A%09%7D%0A%0A%09public String getUserid() %7B%0A%09%09return m_userid;%0A%09%7D%0A%0A%09public String getPassword() %7B%0A%09%09return m_password;%0A%09%7D%0A%0A%09public int getPort() %7B%0A%09%09return m_port;%0A%09%7D%0A%0A%09@Nonnull%0A%09static public DbConnectionInfo decode(@Nonnull String db) %7B%0A%09%09int pos = db.indexOf('@');%0A%09%09if(pos != -1) %7B%0A%09%09%09String a = db.substring(0, pos);%0A%09%09%09String b = db.substring(pos + 1);%0A%0A%09%09%09//-- Get userid/pw%0A%09%09%09pos = a.indexOf(':');%0A%09%09%09if(pos != -1) %7B%0A%09%09%09%09String userid = a.substring(0, pos).trim();%0A%09%09%09%09String password = a.substring(pos + 1).trim();%0A%0A%09%09%09%09pos = b.indexOf('/');%0A%09%09%09%09if(pos != -1) %7B%0A%09%09%09%09%09String sid = b.substring(pos + 1).trim();%0A%09%09%09%09%09b = b.substring(0, pos);%0A%09%09%09%09%09pos = b.indexOf(':');%0A%09%09%09%09%09int port = Integer.parseInt(b.substring(pos + 1).trim());%0A%09%09%09%09%09String hostname = b.substring(0, pos);%0A%09%09%09%09%09return new DbConnectionInfo(hostname, port, sid, userid, password);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09throw new IllegalStateException(%22Invalid database connect string: must be 'user:password@host:port/SID', not %22 + db);%0A%09%7D%0A%7D%0A

Add utility class.