public static org.omg.CosNaming.NameComponent[] toName( String sn )
throws org.omg.CosNaming.NamingContextPackage.InvalidName
{
if( sn == null || sn.length() == 0 || sn.startsWith("/"))
throw new InvalidName();
Vector v = new Vector();
int start = 0;
int i = 0;
for( ; i < sn.length(); i++ )
{
if( sn.charAt(i) == '/' && sn.charAt(i-1) != '\\')
{
if( i-start == 0 )
throw new InvalidName();
v.addElement( getComponent( sn.substring( start, i )));
start = i+1;
}
}
if( start < i )