com.ibm.jvm.dump
Class DvUtils

java.lang.Object
  |
  +--com.ibm.jvm.dump.DvUtils

public class DvUtils
extends java.lang.Object

Description: The methods in this class are generic methods to be used across the whole of the DvConsole and Dumpviewer application. As such all methods should be static, allowing invocation without the need to instantiate DvUtil.


Field Summary
static java.lang.String byteToAscii
           
static java.lang.String byteToHex
           
 
Constructor Summary
DvUtils()
           
 
Method Summary
protected static int convertEndian(int in)
          Description:
static void enableConsoleTrace(boolean b)
          Description:
static void errorMsg(java.lang.String error, int severity)
          Description: Generic error message handler output when something unexpected goes wrong.
static java.util.Vector findCommandPlugins()
          Description: The CommandPlugins stanza in Dv.properties is used to establish the list of supported plugins.
static com.ibm.jvm.dump.DvDump findDumpClass(java.lang.String theSource, java.lang.String theList)
          Description:
static com.ibm.jvm.dump.DvDump findDumpPlugin(java.lang.String filename)
          Description:
static com.ibm.jvm.dump.DvAddress findInMemory(com.ibm.jvm.dump.DvDump theDump, byte[] whatFor, com.ibm.jvm.dump.DvAddress startPoint, com.ibm.jvm.dump.DvAddress endPoint, int boundary)
          Description: Find sequence of bytes in memory crossing memranges if necessary.
static long findNextInFile(java.io.RandomAccessFile raf, byte[] whatFor, long startPoint, long endPoint, int boundary)
          Description: Find sequence of bytes in a random access file.
static java.lang.String getDvProperty(java.lang.String propname)
          Description: Get a name property value from Dv.properties
static java.lang.String getProperty(java.lang.String prop)
          Description:
static int getPropertyInt(java.lang.String prop)
          Description:
static Dvifm getTheIFM()
          Description: With the Dumpviewer many people want access to the IFM at various times.
static long hexToLong(java.lang.String hex)
          Description: Converts a hex string to a java long - handles up to 16 hex characters, returns -1 for bad input.
static void infoMsg(java.lang.String info)
          Description: Generic error message handler output when something unexpected goes wrong.
static boolean isConsoleOutput()
          Description:
static void output(java.lang.String o)
          Description:
static void removeSpecFromVector(java.util.Vector v, java.lang.String s)
          Description:
static void setConsoleOutput(boolean b)
          Description:
static void setJavaLookAndFeel()
          Description:
static void setMotifLookAndFeel()
          Description:
static void setNativeLookAndFeel()
          Description:
static void setProperties(java.util.Properties p)
          Description:
static void setTc_text(javax.swing.JTextArea ta)
          Description: Inform trace of the text area that has been established and added to the trace frame.
static void setTheIFM(Dvifm ifm)
          Description: The internal frame manager is established elsewhere but trace uses it when under Dumpviewer, this communcates its whereabouts.
static void writetoTrace(java.lang.String traceEntry)
          Description: Writes a line out to our trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

byteToHex

public static java.lang.String byteToHex

byteToAscii

public static java.lang.String byteToAscii
Constructor Detail

DvUtils

public DvUtils()
Method Detail

errorMsg

public static void errorMsg(java.lang.String error,
                            int severity)

Description: Generic error message handler output when something unexpected goes wrong.


infoMsg

public static void infoMsg(java.lang.String info)

Description: Generic error message handler output when something unexpected goes wrong.


setTc_text

public static void setTc_text(javax.swing.JTextArea ta)

Description: Inform trace of the text area that has been established and added to the trace frame.


getDvProperty

public static java.lang.String getDvProperty(java.lang.String propname)

Description: Get a name property value from Dv.properties


findCommandPlugins

public static java.util.Vector findCommandPlugins()

Description: The CommandPlugins stanza in Dv.properties is used to establish the list of supported plugins. These are then found, validity checked and returned.

Returned : Vector containing command plugin class instances.


findDumpPlugin

public static com.ibm.jvm.dump.DvDump findDumpPlugin(java.lang.String filename)

Description:

Input :

Returned :


enableConsoleTrace

public static void enableConsoleTrace(boolean b)

Description:

Input :

Returned :


setNativeLookAndFeel

public static void setNativeLookAndFeel()

Description:

Input :

Returned :


setJavaLookAndFeel

public static void setJavaLookAndFeel()

Description:

Input :

Returned :


setMotifLookAndFeel

public static void setMotifLookAndFeel()

Description:

Input :

Returned :


setTheIFM

public static void setTheIFM(Dvifm ifm)

Description: The internal frame manager is established elsewhere but trace uses it when under Dumpviewer, this communcates its whereabouts.


getTheIFM

public static Dvifm getTheIFM()

Description: With the Dumpviewer many people want access to the IFM at various times.


writetoTrace

public static void writetoTrace(java.lang.String traceEntry)

Description: Writes a line out to our trace


hexToLong

public static long hexToLong(java.lang.String hex)

Description: Converts a hex string to a java long - handles up to 16 hex characters, returns -1 for bad input.


findDumpClass

public static com.ibm.jvm.dump.DvDump findDumpClass(java.lang.String theSource,
                                                    java.lang.String theList)

Description:

Input :

Returned :


removeSpecFromVector

public static void removeSpecFromVector(java.util.Vector v,
                                        java.lang.String s)

Description:

Input :

Returned :


setProperties

public static void setProperties(java.util.Properties p)

Description:

Input :

Returned :


getPropertyInt

public static int getPropertyInt(java.lang.String prop)

Description:

Input :

Returned :


getProperty

public static java.lang.String getProperty(java.lang.String prop)

Description:

Input :

Returned :


isConsoleOutput

public static boolean isConsoleOutput()

Description:

Input :

Returned :


setConsoleOutput

public static void setConsoleOutput(boolean b)

Description:

Input :

Returned :


convertEndian

protected static final int convertEndian(int in)

Description:

Input :

Returned :


output

public static void output(java.lang.String o)

Description:

Input :

Returned :


findNextInFile

public static long findNextInFile(java.io.RandomAccessFile raf,
                                  byte[] whatFor,
                                  long startPoint,
                                  long endPoint,
                                  int boundary)

Description: Find sequence of bytes in a random access file.


findInMemory

public static com.ibm.jvm.dump.DvAddress findInMemory(com.ibm.jvm.dump.DvDump theDump,
                                                      byte[] whatFor,
                                                      com.ibm.jvm.dump.DvAddress startPoint,
                                                      com.ibm.jvm.dump.DvAddress endPoint,
                                                      int boundary)

Description: Find sequence of bytes in memory crossing memranges if necessary.