private String getOsName ( ) { // windows if ( OS_NAME . contains ( "win" ) ) { boolean is64bit = ( System . getenv ( "ProgramFiles(x86)" ) != null ) ; return "windows_" + ( is64bit ? "x86_64" : "x86" ) ; } else if ( OS_NAME . contains ( "mac" ) ) { // mac osx return "mac_" + OS_ARCH ; } else if ( OS_NAME . contains ( "nix" ) || OS_NAME . contains ( "nux" ) || OS_NAME . indexOf ( "aix" ) > 0 ) { // unix return "amd64" . equalsIgnoreCase ( OS_ARCH ) ? "linux_x86_64" : "linux_" + OS_ARCH ; } else { throw new WebpIOException ( "Hi boy, Your OS is not support!!" ) ; } }
get os name and arch