Class 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()  
    • Constructor Detail

      • SystemUtils

        public SystemUtils()
    • 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)