Package jadex.commons
Class SNonAndroid
- java.lang.Object
- 
- jadex.commons.SNonAndroid
 
- 
 public class SNonAndroid extends java.lang.ObjectHelper class for methods used from non-android code.
- 
- 
Constructor SummaryConstructors Constructor Description SNonAndroid()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclearAWT()Workaround for AWT/Swing memory leaks.static java.util.ResourceBundlefindResourceBundle(java.lang.String name, java.util.Locale currentLocale, java.lang.ClassLoader cl)Try to find aResourceBundleby trying Classloaders from all calling Classes.static java.io.FilegetDefaultDirectory()Get the default directory.static java.lang.StringgetDisplayName(java.io.File file)Get the display name (e.g.static java.io.File[]getFiles(java.io.File file, boolean hiding)Get the files of a directory.static java.io.FilegetHomeDirectory()Get the home directory.static java.lang.String[]getMacAddresses()Get the mac address.static java.util.List<java.net.InetAddress>getNetworkIps()Get the network ips.static shortgetNetworkPrefixLength(java.net.InetAddress iadr)Get the network prefix length for IPV4 address 24=C, 16=B, 8=A classes.static java.io.FilegetParentDirectory(java.io.File file)Get the parent directory.static booleanhasGui()Test if there is a gui available.static booleanisFloppyDrive(java.io.File file)Check if a file represents a floppy.static booleanisGuiThread()Test if a call is running on the swing thread.static voidopenFile(java.lang.String path)Opens a File with the default application.
 
- 
- 
- 
Method Detail- 
getNetworkPrefixLengthpublic static short getNetworkPrefixLength(java.net.InetAddress iadr) Get the network prefix length for IPV4 address 24=C, 16=B, 8=A classes. Returns -1 in case of V6 address.- Parameters:
- iadr- The address.
- Returns:
- The length of the prefix.
 
 - 
isFloppyDrivepublic static boolean isFloppyDrive(java.io.File file) Check if a file represents a floppy.
 - 
getDisplayNamepublic static java.lang.String getDisplayName(java.io.File file) Get the display name (e.g. of a system drive).
 - 
findResourceBundlepublic static java.util.ResourceBundle findResourceBundle(java.lang.String name, java.util.Locale currentLocale, java.lang.ClassLoader cl)Try to find aResourceBundleby trying Classloaders from all calling Classes.- Parameters:
- name- Name of the ResourceBundle to find
- currentLocale- Name of the locale
- cl- the default classloader
- Returns:
- The found ResourceBundleornull.
 
 - 
getNetworkIpspublic static java.util.List<java.net.InetAddress> getNetworkIps() Get the network ips.
 - 
openFilepublic static void openFile(java.lang.String path) throws java.io.IOExceptionOpens a File with the default application.- Parameters:
- path-
- Throws:
- java.io.IOException
 
 - 
isGuiThreadpublic static boolean isGuiThread() Test if a call is running on the swing thread.
 - 
hasGuipublic static boolean hasGui() Test if there is a gui available.
 - 
getHomeDirectorypublic static java.io.File getHomeDirectory() Get the home directory.
 - 
getDefaultDirectorypublic static java.io.File getDefaultDirectory() Get the default directory.
 - 
getParentDirectorypublic static java.io.File getParentDirectory(java.io.File file) Get the parent directory.
 - 
getFilespublic static java.io.File[] getFiles(java.io.File file, boolean hiding)Get the files of a directory.
 - 
getMacAddressespublic static java.lang.String[] getMacAddresses() Get the mac address.- Returns:
- The mac address.
 
 - 
clearAWTpublic static void clearAWT() Workaround for AWT/Swing memory leaks.
 
- 
 
-