Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ensembl.util
Class SystemUtil

    java.lang.Object
      org.ensembl.util.SystemUtil

public class SystemUtil
extends java.lang.Object

Nested Class Summary
`static class` | `SystemUtil.MemoryStatus`

Constructor Summary
`SystemUtil()`

Method Summary
`static java.lang.String` | `environmentDump()`
`static java.lang.String` | `getClasspath()`
`static void` | `main(java.lang.String[] args)`
`static SystemUtil.MemoryStatus` | `memoryStatus()` Memory usage for JVM, useful for debugging.
`static SystemUtil.MemoryStatus` | `memoryStatus(boolean gc)` Memory usage for JVM, useful for debugging.
`static java.net.URL` | `runtimeResourceLocation(java.lang.String src)` Attempts to resolve the src to a URL.
`static java.lang.String` | `toString(int[] array)` Converts array into a string representation.
`static java.lang.String` | `toString(java.lang.Object[] array)` Converts each element in the array to a string via element.toString() and creates a formated string containing all the strings.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SystemUtil

    public SystemUtil()

Method Detail

### toString

    public static java.lang.String toString(java.lang.Object[] array)

  Converts each element in the array to a string via element.toString() and creates a formated string containing all the strings. Format:

        0 = item0
        1 = item2
        3 = item3
        ...

### toString

    public static java.lang.String toString(int[] array)

  Converts array into a string representation. String format: index = item

        0 = item0
        1 = item2
        3 = item3
        ...

### getClasspath

    public static java.lang.String getClasspath()

### memoryStatus

    public static final SystemUtil.MemoryStatus memoryStatus()

  Memory usage for JVM, useful for debugging. Does not call garbage collector before determining memory usage.

  Returns:
    string containing total and free memory usage for JVM.

### memoryStatus

    public static final SystemUtil.MemoryStatus memoryStatus(boolean gc)

  Memory usage for JVM, useful for debugging.

  Parameters:
    `gc` - whether to call System.gc() before determining memory usage.
  Returns:
    string containing total and free memory usage for JVM.

### environmentDump

    public static java.lang.String environmentDump()

### runtimeResourceLocation

    public static java.net.URL runtimeResourceLocation(java.lang.String src)

  Attempts to resolve the src to a URL. This is useful for checking where a class or resource file is being loaded from by the classloadeder.
  e.g. src = ...
  - org.ensembl.Example
  - org/ensembl/Example.class
  - com.mysql.jdbc.Driver
  Performs some magic to try to resolve the name if necessary, e.g. for org.ensembl.Example "full names" like org/ensembl/Example.class and org\ensembl\Example.class will be tried.

  Parameters:
    `src` - src file path or qualified class name.
  Returns:
    resolved URL or null if none found.

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD