@SuppressWarnings("deprecation") public static int OSTypeToInt(String type){
  int result=0;
  byte b[]={(byte)0,(byte)0,(byte)0,(byte)0};
  int len=type.length();
  if (len > 0) {
    if (len > 4)     len=4;
    type.getBytes(0,len,b,4 - len);
  }
  for (int i=0; i < len; i++) {
    if (i > 0)     result<<=8;
    result|=(b[i] & 0xff);
  }
  return result;
}

@ SuppressWarnings ( "deprecation" ) public static int OSTypeToInt ( String type ) { int result = 0 ; byte b [ ] = { ( byte ) 0 , ( byte ) 0 , ( byte ) 0 , ( byte ) 0 } ; int len = type . length ( ) ; if ( len > 0 ) { if ( len > 4 ) len = 4 ; type . getBytes ( 0 , len , b , 4 - len ) ; } for ( int i = 0 ; i < len ; i ++ ) { if ( i > 0 ) result <<= 8 ; result |= ( b [ i ] & 0xff ) ; } return result ; }
converts an ostype ( e . g . " macs " from < carboncore / folders . h > ) into an int .
