public static VersionNumber fromString(String str){
  if (str == null) {
    return null;
  }
  String[] pieces=str.split("\\.");
  if (pieces.length != 4) {
    return null;
  }
  VersionNumber version=new VersionNumber();
  try {
    for (int i=0; i < 4; ++i) {
      version.mVersion[i]=Integer.parseInt(pieces[i]);
    }
  }
 catch (  NumberFormatException e) {
    return null;
  }
  return version;
}

public static VersionNumber fromString ( String str ) { if ( str == null ) { return null ; } String [ ] pieces = str . split ( "\\." ) ; if ( pieces . length != 4 ) { return null ; } VersionNumber version = new VersionNumber ( ) ; try { for ( int i = 0 ; i < 4 ; ++ i ) { version . mVersion [ i ] = Integer . parseInt ( pieces [ i ] ) ; } } catch ( NumberFormatException e ) { return null ; } return version ; }
parses out the version numbers from a given version string .
