Package de.mid.innovator.util
Class SystemUtils
- java.lang.Object
-
- de.mid.innovator.util.SystemUtils
-
public final class SystemUtils extends java.lang.Object
The class contains functions to get system dependent information or call system dependent functions.- Author:
- borschet
-
-
Constructor Summary
Constructors Constructor Description SystemUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
FileReadToByteArray(java.io.File file)
static java.lang.String
getDisplay()
Returns the display depending on the operating system.static java.lang.String
getFQHostName()
static java.lang.String
getHostName()
static java.lang.String
getSystemDomain()
Returns the system user name depending on the operating system.static SystemDomainKind
getSystemDomainKind()
Tells how the system domain has been computed.static java.lang.String
getSystemUser()
Returns the system user name depending on the operating system.static SystemUserKind
getSystemUserKind()
Tells how the system user has been computed.static boolean
isLocalIPAddress(java.lang.String ipStr)
static void
OpenDocument(java.lang.String strDocumentName)
Opens a document depending on the operating system.
-
-
-
Method Detail
-
getDisplay
public static java.lang.String getDisplay()
Returns the display depending on the operating system.- Returns:
- Windows - HostName:LoginName Unix - DISPLAY
-
getSystemUser
public static java.lang.String 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
public static SystemUserKind getSystemUserKind()
Tells how the system user has been computed.- Returns:
- kind of system user
-
getSystemDomain
public static java.lang.String getSystemDomain()
Returns the system user name depending on the operating system.- Returns:
- Windows - Environ USERDOMAIN - if null the host name
-
getSystemDomainKind
public static SystemDomainKind getSystemDomainKind()
Tells how the system domain has been computed.- Returns:
- kind of system domain
-
OpenDocument
public static void OpenDocument(java.lang.String strDocumentName) throws java.io.IOException
Opens a document depending on the operating system.- Throws:
java.io.IOException
-
getFQHostName
public static java.lang.String getFQHostName()
-
getHostName
public static java.lang.String getHostName()
-
FileReadToByteArray
public static byte[] FileReadToByteArray(java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
isLocalIPAddress
public static boolean isLocalIPAddress(java.lang.String ipStr)
-
-