private static void init ( ) { if ( hasInitialized ) { return ; } final String osName = System . getProperty ( "os.name" ) ; if ( osName != null ) { final String osNameLower = osName . toLowerCase ( ) ; isWindows = osNameLower . contains ( "windows" ) ; isMac = osNameLower . contains ( "mac os x" ) || osNameLower . contains ( "darwin" ) ; isLinux = osNameLower . contains ( "nux" ) ; isUnix = osNameLower . contains ( "nix" ) || osNameLower . contains ( "nux" ) ; isSolaris = osNameLower . contains ( "sunos" ) || osNameLower . contains ( "solaris" ) ; } lineEnder = isWindows ? "\r\n" : "\n" ; final String model = System . getProperty ( "sun.arch.data.model" ) ; // sun.arch.data.model=32 // 32 bit JVM // sun.arch.data.model=64 // 64 bit JVM if ( StringUtils . isBlank ( model ) ) { bit32 = true ; bit64 = false ; } else if ( "64" . equals ( model ) ) { bit32 = false ; bit64 = true ; } else { bit32 = true ; bit64 = false ; } }
Initialize static variables .