Class NamingUtils

java.lang.Object
com.sun.corba.ee.impl.naming.cosnaming.NamingUtils

public class NamingUtils extends Object
  • Field Details

    • debug

      public static boolean debug
      Debug flag which must be true for debug streams to be created and dprint output to be generated.
    • debugStream

      public static PrintStream debugStream
      The debug printstream.
    • errStream

      public static PrintStream errStream
      The error printstream.
  • Constructor Details

    • NamingUtils

      private NamingUtils()
  • Method Details

    • dprint

      public static void dprint(String msg)
      Prints the message to the debug stream if debugging is enabled.
      Parameters:
      msg - the debug message to print.
    • errprint

      public static void errprint(String msg)
      Prints the message to the error stream (System.err is default).
      Parameters:
      msg - the error message to print.
    • printException

      public static void printException(Exception e)
      Prints the stacktrace of the supplied exception to the error stream.
      Parameters:
      e - any Java exception.
    • makeDebugStream

      public static void makeDebugStream(File logFile) throws IOException
      Create a debug print stream to the supplied log file.
      Parameters:
      logFile - the file to which debug output will go.
      Throws:
      IOException - thrown if the file cannot be opened for output.
    • makeErrStream

      public static void makeErrStream(File errFile) throws IOException
      Create a error print stream to the supplied file.
      Parameters:
      errFile - the file to which error messages will go.
      Throws:
      IOException - thrown if the file cannot be opened for output.
    • getDirectoryStructuredName

      static String getDirectoryStructuredName(NameComponent[] name)
      A utility method that takes Array of NameComponent and converts into a directory structured name in the format of /id1.kind1/id2.kind2.. This is used mainly for Logging.