Package de.mid.innovator.util
Class SystemUtils
java.lang.Object
de.mid.innovator.util.SystemUtils
The class contains functions to get system dependent information or call
system dependent functions.
- Author:
- borschet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]FileReadToByteArray(File file) static StringReturns the display depending on the operating system.static Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic intstatic Stringstatic booleanstatic Stringstatic booleanstatic StringReturns the system user name depending on the operating system.static SystemDomainKindTells how the system domain has been computed.static StringReturns the system user name depending on the operating system.static SystemUserKindTells how the system user has been computed.static booleanisLocalIPAddress(String ipStr) static voidOpenDocument(String strDocumentName) Opens a document depending on the operating system.
-
Field Details
-
SYSTEM_PROPERTY_IPV6USE
- See Also:
-
SYSTEM_PROPERTY_NATUSE
- See Also:
-
SYSTEM_PROPERTY_HOSTNAME
- See Also:
-
SYSTEM_PROPERTY_IPADR
- See Also:
-
ConstStrInoHost
- See Also:
-
-
Constructor Details
-
SystemUtils
public SystemUtils()
-
-
Method Details
-
getDisplay
Returns the display depending on the operating system.- Returns:
- Windows - HostName:LoginName Unix - DISPLAY
-
getSystemUser
Returns the system user name depending on the operating system.- Returns:
- Windows - System property user.name or JavaAPI if it is not known by the os Unix - System property USER or JavaAPI if it is not known by the os
-
getSystemUserKind
Tells how the system user has been computed.- Returns:
- kind of system user
-
getSystemDomain
Returns the system user name depending on the operating system.- Returns:
- Windows - Environ USERDOMAIN - if null the host name
-
getSystemDomainKind
Tells how the system domain has been computed.- Returns:
- kind of system domain
-
OpenDocument
Opens a document depending on the operating system.- Throws:
IOException
-
getInohost
-
getInohostName
-
getInohostPort
public static int getInohostPort() -
getIpv6Use
public static boolean getIpv6Use() -
getNatUse
public static boolean getNatUse() -
getIPADddressByProperty
-
getExternHostname
-
getLocalHostnameByProperty
-
getFQHostName
-
getHostName
-
FileReadToByteArray
- Throws:
IOException
-
isLocalIPAddress
-