/*::.
==================================================================================================================================
================================================= Copyright  2014 Allen Baker =================================================
                                                 +------------------------------+
File:       BatBanner.java
Originator: Allen Baker (2014.07.05 04:41)
LayoutRev:  5
================================================================================================================================== */
package cosmicabyss.com.app;

import java.io.*;
import java.util.*;
import cosmicabyss.com.lib.*;



/*::
======================================================================================================================== *//**
Description<PRE>
   This program concatenates all the command line argument strings together - separated by a single space between each
   one - into a single message and prints that message within an visually prominent banner on the system console.
</PRE>

Usage<PRE>
   java cosmicabyss.com.app.BatBanner argumentStrings+
      Arguments can be placed in any order on the command line.
</PRE>

<P>

<DL>
   <DT>
      <B>Example usage:</B>

      <DD>
         <PRE>
            *java cosmicabyss.com.app.BatBanner -r -x"*.bat" "..\*.*"
         </PRE>
      </DD>
   </DT>

   <DT>
      <B>View Source:</B>

      <DD>
         <A href="BatBanner.java.html">BatBanner.java</A>
      </DD>
   </DT>
   <DT>
      <B>Author:</B>
      <DD>
         <A href="mailto:sourcecode.v01@cosmicabyss.com">
            Allen Baker
         </A>
      </DD>
   </DT>
</DL>
*//*
======================================================================================================================== */
public class BatBanner
   {



   /*:.
   ==============================================================================================================
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[  Constants  ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   ============================================================================================================== */



   /*.
   ==========================================================================================
   CLASS_NAME:
      the name of this class
   DESCRIPTION:
      the man page description of this application
   USAGE:
      the man page usage information for this application
   ------------------------------------------------------------------------------------------ */
   private static final XString  CLASS_NAME  = new XString(BatBanner.class.getName());
   private static final XString  DESCRIPTION = new XString
      (
      // <Description>  Preprocessor generated String definition, Don't mess with it.
      "This program concatenates all the command line argument strings together - separated by a single space between each  \n" +
      "one - into a single message and prints that message within an visually prominent banner on the system console.       \n" +
      ""// </Description>
      );
   private static final XString  USAGE       = new XString
      (
      // <Usage>        Preprocessor generated String definition, Don't mess with it.
      "java cosmicabyss.com.app.BatBanner argumentStrings+                                                                  \n" +
      "   Arguments can be placed in any order on the command line.                                                         \n" +
      ""// </Usage>
      );



   /*:.
   ==============================================================================================================
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[  Types  ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Enums  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Structs  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Classes  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Interfaces  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[  Variables  ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   ============================================================================================================== */



   /*.
   ==========================================================================================
   cOut:
      formatted and time-stamped console output.
   ------------------------------------------------------------------------------------------ */
   private static ConsoleStream  cOut = ConsoleStream.getSingleton();
   /*.
   ==========================================================================================
   iFileNameList:
      the list of all file names that match the filespecs given on the command line.
   iGlobalProperties:
      a copy of all the environment variables.
   ------------------------------------------------------------------------------------------ */
   private FileNameList      iFileNameList     = null;
   private GlobalProperties  iGlobalProperties = null;



   /*:.
   ==============================================================================================================
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[  Functions  ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Constructors  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method creates a BatBanner class object and runs the application to completion.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#000">View source</A>

   @param
      pArgs contains the command line arguments with which the class was invoked as an application.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   public <Type> BatBanner(Type[] pArgs) throws Exception
      {
      boolean  successCode = true;

      successCode = initializeInstanceConstantsAndVariables(pArgs);
      if (successCode)
         {
         }
      cOut.println
         (
         CLASS_NAME.string() +
         (successCode? " completed successfully." : " completed with problems.")
         );
      cOut.println();
      cOut.stopLog();
      }



   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Initialization  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method is the class static initialization block which is run the first time the JVM loads this
   class code and before anything else in this class is accessed

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#001">View source</A>

   *//*
   ---------------------------------------------------------------------------------------------------- */
   static
      {
      /*.
      ==========================================================================================
      if required, make sure all the class constants and variables are initialized the first
      time the JVM loads this class code and before anything else in this class is accessed
      ------------------------------------------------------------------------------------------ */
      initializeClassConstantsAndVariables();
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method is called from the class static initialization block to make sure all the class
   constants and variables are initialized the first time the JVM loads this class code and before
   anything else in this class is accessed

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#002">View source</A>

   *//*
   ---------------------------------------------------------------------------------------------------- */
   private static void initializeClassConstantsAndVariables()
      {
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method initializes all the instance constants and variables

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#003">View source</A>

   @param
      pArgs contains the command line arguments with which the class was invoked as an application.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   private <Type> boolean initializeInstanceConstantsAndVariables(Type[] pArgs) throws Exception
      {
      boolean  successCode = true;

      successCode = processCommandLine(pArgs);
      if (successCode)
         {
         }
      return successCode;
      }



   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Methods  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method sets the ConsoleStream for this object.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#004">View source</A>

   @return
      a reference to this object

   @param
      pConsole is a ConsoleStream through which this objects sends its output.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   public BatBanner setOut(ConsoleStream pConsole)
      {
      cOut = pConsole;
      return this;
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This boilerplate method is used for testing an instantiated object of this class and may include any
   code the developer chooses.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#005">View source</A>

   @return
      a reference to this object
   *//*
   ---------------------------------------------------------------------------------------------------- */
   public BatBanner test() throws Exception
      {
      cOut.titledPrintf
         (
         "\"HELLO WORLD!\"",
         "%s  %s  %s",
         "I'm an object of the", CLASS_NAME, "class, and I approved this message."
         );
      return this;
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method performs the core processing functions of this application.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#006">View source</A>

   @return
      a success code of true if all goes well, false otherwise.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   private boolean processAllFiles() throws Exception
      {
      boolean  successCode = true;
      String   fmtStr;
      /*.
      ==========================================================================================
      tell 'em what we're gonna do
      ------------------------------------------------------------------------------------------ */
      cOut.println("Plan","Will process " + iFileNameList.size() + " files.");
      if      (iFileNameList.size() > 99999) fmtStr = "%06d";
      else if (iFileNameList.size() >  9999) fmtStr = "%05d";
      else if (iFileNameList.size() >   999) fmtStr = "%04d";
      else if (iFileNameList.size() >    99) fmtStr = "%03d";
      else if (iFileNameList.size() >     9) fmtStr = "%02d";
      else                                   fmtStr = "%d";
      /*.
      ==========================================================================================
      do it for each file in the FileNameList
      ------------------------------------------------------------------------------------------ */
      int  filesProcessed = 0;
      for (XString  fileName : iFileNameList)
         {
         XFile    file          = new XFile(fileName);
         XString  canonicalPath = new XString(file.getCanonicalPath());
         /*.
         ==========================================================================================
         tell 'em which file is being processed next
         ------------------------------------------------------------------------------------------ */
         filesProcessed++;
         cOut.printf("[" + fmtStr + "] Processing: %s\n",filesProcessed,canonicalPath);
         /*.
         ==========================================================================================
         process the file
         ------------------------------------------------------------------------------------------ */
         successCode &= processThisFile(canonicalPath);
         }
      /*.
      ==========================================================================================
      tell 'em what we did
      ------------------------------------------------------------------------------------------ */
      cOut.println("Result","Processed " + filesProcessed + " of an expected " + iFileNameList.size() + " files.");
      return successCode;
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method performs the core processing functions of this application on one file.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#007">View source</A>

   @return
      a success code of true if all goes well, false otherwise.

   @param
      pFileName is the name of the file to process.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   private boolean processThisFile(XString pFileName) throws Exception
      {
      boolean   successCode = true;
      TextFile  inFile      = new TextFile(pFileName);
      /*.
      ==========================================================================================
      this method makes no sense on directory files; it must be a normal file
      ------------------------------------------------------------------------------------------ */
      if (inFile.isDirectory()) return successCode;
      /*.
      ==========================================================================================
      ------------------------------------------------------------------------------------------ */
      TextReaderIterator  inIter = inFile.iterator();
      /*.
      ==========================================================================================
      ------------------------------------------------------------------------------------------ */
      while (inIter.hasNext())
         {
         XString  line = inIter.next();
         }
      /*.
      ==========================================================================================
      tell 'em how it went
      ------------------------------------------------------------------------------------------ */
      return successCode;
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method displays the command line arguments that this program was invoked with.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#008">View source</A>

   @param
      pArgs contains the command line arguments with which the class was invoked as an application.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   private <Type> void showArgs(Type[] pArgs) throws Exception
      {
      XString  str = new XString("");
      for (int i=0; i<pArgs.length; i++)
         {
         str = str.concat(UString.toString(pArgs[i]) + "   ");
         }
      cOut.println("Command Line Arguments",str);
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method processes the command line arguments and based on what it finds, sets the instance
   variables.

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#009">View source</A>

   @return
      a success code of true if all goes well, false otherwise.

   @param
      pArgs contains the command line arguments with which the class was invoked as an application.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   private <Type> boolean processCommandLine(Type[] pArgs) throws Exception
      {
      boolean  successCode = true;
      /*
      ==========================================================================================
      Greetings !
      ------------------------------------------------------------------------------------------ */
      System.out.println();
      System.out.println();
      System.out.println();
      System.out.println();
      cOut.banner(CLASS_NAME);
      System.out.println();
      /*.
      ==========================================================================================
      tell the user what command line arges this program started with
      ------------------------------------------------------------------------------------------ */
      showArgs(pArgs);
      /*.
      ==========================================================================================
      this cannot be done statically because it throws an exception.
      ------------------------------------------------------------------------------------------ */
      iGlobalProperties = new GlobalProperties();
      /*.
      ==========================================================================================
      get ready to process the command line arguments
      ------------------------------------------------------------------------------------------ */
      CommandLine  cmdLn = new CommandLine(CLASS_NAME,pArgs);
      /*.
      ==========================================================================================
      these are the valid command line controls
      ------------------------------------------------------------------------------------------ */
      cmdLn.addControlsFromString(":h");
      /*.
      ==========================================================================================
      list the valid controls
      ------------------------------------------------------------------------------------------ */
      cmdLn.listControls();
      cOut.println();
      /*.
      ==========================================================================================
      interpret the arguments on the command line
      ------------------------------------------------------------------------------------------ */
      HashSet<XString>          controlsWithoutArgs = new HashSet<XString>();
      HashMap<XString,XString>  controlsWithArgs    = new HashMap<XString,XString>();
      ArrayList<XString>        excludedFileSpecs   = new ArrayList<XString>();
      ArrayList<XString>        includedFileSpecs   = new ArrayList<XString>();
      boolean                   result              = cmdLn.commandLineArgs
         (
         iGlobalProperties  ,
         controlsWithoutArgs,
         controlsWithArgs   ,
         excludedFileSpecs  ,
         includedFileSpecs
         );
      /*.
      ==========================================================================================
      if the command line was messed up, abort the program
      ------------------------------------------------------------------------------------------ */
      if (includedFileSpecs.isEmpty())
         {
         cOut.println("COMMAND LINE ERROR: MANDATORY control NOT on command line:  fileSpecs");
         }
      if ((result == false) || (includedFileSpecs.isEmpty()))
         {
         usage();
         cOut.titledSeverityPrintf
            (
            Const.HALT,
            CLASS_NAME,
            "Command line error."
            );
         cOut.stopLog();
         System.exit(-1);
         }
      /*.
      ==========================================================================================
      arguments for the FileNameList with their default values.  Some of these arguments may be
      modified by commandline controls.
      ------------------------------------------------------------------------------------------ */
      boolean  recurse             = false;
      boolean  fullyQualifiedNames = true;
      boolean  matchSubdirs        = false;
      boolean  sort                = true;
      boolean  collapse            = false;
      /*.
      ==========================================================================================
      process commandline controls without arguments
      ------------------------------------------------------------------------------------------ */
      for (XString  ctl : controlsWithoutArgs)
         {
         cOut.println(ctl.string() + " control is present.");
         if (ctl.equals("-h"))
            {
            usage();
            cOut.stopLog();
            System.exit(-1);
            }
         recurse      |= ctl.equals("-r");
         matchSubdirs |= ctl.equals("-s");
         }
      if (controlsWithoutArgs.size() > 0) cOut.println();
      /*.
      ==========================================================================================
      process commandline controls with arguments
      ------------------------------------------------------------------------------------------ */
      Set<XString>  set = controlsWithArgs.keySet();
      for (XString  ctl : set)
         {
         XString argStr = controlsWithArgs.get(ctl);
         cOut.println(ctl + " control is present with the argument: " + argStr);
         }
      if (controlsWithArgs.size() > 0) cOut.println();
      /*.
      ==========================================================================================
      get a list of all the files names that will be processed
      ------------------------------------------------------------------------------------------ */
      for (XString  fileSpec : includedFileSpecs)
         {
         cOut.println("Files matching this fileSpec will be INcluded: " + fileSpec);
         }
      if (includedFileSpecs.size() > 0) cOut.println();
      for (XString  fileSpec : excludedFileSpecs)
         {
         cOut.println("Files matching this fileSpec will be EXcluded: " + fileSpec);
         }
      if (excludedFileSpecs.size() > 0) cOut.println();
      iFileNameList = new FileNameList
         (
         includedFileSpecs,excludedFileSpecs,recurse,fullyQualifiedNames,matchSubdirs,sort,collapse
         );
      /*.
      ==========================================================================================
      ------------------------------------------------------------------------------------------ */
      return successCode;
      }



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method writes a usage message to the log

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#010">View source</A>

   *//*
   ---------------------------------------------------------------------------------------------------- */
   private void usage()
      {
      cOut.println("Program Description",DESCRIPTION);
      cOut.println("Usage",USAGE);
      }



   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Main  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */



   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method runs the BatBanner class as a standalone application. It's the method that's called when
   the class is invoked from the command line by using the java application launcher - "java".

   Usage<PRE>
   java cosmicabyss.com.app.BatBanner argumentStrings+
      Arguments can be placed in any order on the command line.
   </PRE>

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#011">View source</A>

   @param
      pArgs contains the command line arguments with which the class was invoked as an application.
   *//*
   ---------------------------------------------------------------------------------------------------- */
   public static void main(String[] pArgs) throws Exception
      {
      int    lineWidth  = 140;
      String firstRow   = null;
      String secondRow  = null;
      String thirdRow   = null;
      String fourthRow  = null;
      String fifthRow   = null;
      int    fieldWidth = 0;
      /*.
      ==========================================================================================
      assemble the message by concatenating the command line arguments together with a single
      space between each
      ------------------------------------------------------------------------------------------ */
      StringBuffer  message = new StringBuffer();
      for (int idx = 0; idx < pArgs.length; idx++)
         {
         String spacer = ((idx < pArgs.length-1)? " " : "");
         message.append(pArgs[idx] + spacer);
         }
      /*.
      ==========================================================================================
      the fieldWidth will be wide enough for the message plus 2 spaces on either side of it.
      ------------------------------------------------------------------------------------------ */
      fieldWidth = message.length() + 4;
      /*.
      ==========================================================================================
      make a string of horizontal bars that connect down to vertical bars on the next row
      ------------------------------------------------------------------------------------------ */
      firstRow = (new XString("")).alignCenter(lineWidth, Const.CHAR_DOUBLE_DOWN_AND_HORIZONTAL).toString();
      /*.
      ==========================================================================================
      make a string of horizontal bars that connect up to the vertical bars on the previous row.
      Make it the message fieldWidth and then center it on a linewidth of vertical bars that
      connect to the vertical bars on the previous and next rows.
      ------------------------------------------------------------------------------------------ */
      secondRow = (new XString("")).alignCenter(fieldWidth, Const.CHAR_DOUBLE_UP_AND_HORIZONTAL).toString();
      secondRow = Character.toString(Const.CHAR_DOUBLE_VERTICAL_AND_RIGHT) + secondRow + Character.toString(Const.CHAR_DOUBLE_VERTICAL_AND_LEFT);
      secondRow = (new XString(secondRow)).alignCenter(lineWidth, Const.CHAR_DOUBLE_VERTICAL).toString();
      /*.
      ==========================================================================================
      put 2 spaces on both sides of the message and then center that on a linewidth of verticle
      bars
      ------------------------------------------------------------------------------------------ */
      thirdRow = (new XString(message.toString())).alignCenter(fieldWidth, ' ').toString();
      thirdRow = (new XString(thirdRow)).alignCenter(lineWidth, Const.CHAR_DOUBLE_VERTICAL).toString();
      /*.
      ==========================================================================================
      make a string of horizontal bars that connect up to the vertical bars on the next row.
      Make it the message fieldWidth and then center it on a linewidth of vertical bars that
      connect to the vertical bars on the previous and next rows.
      ------------------------------------------------------------------------------------------ */
      fourthRow = (new XString("")).alignCenter(fieldWidth, Const.CHAR_DOUBLE_DOWN_AND_HORIZONTAL).toString();
      fourthRow = Character.toString(Const.CHAR_DOUBLE_VERTICAL_AND_RIGHT) + fourthRow + Character.toString(Const.CHAR_DOUBLE_VERTICAL_AND_LEFT);
      fourthRow = (new XString(fourthRow)).alignCenter(lineWidth, Const.CHAR_DOUBLE_VERTICAL).toString();
      /*.
      ==========================================================================================
      make a string of horizontal bars that connect up to vertical bars on the previous row
      ------------------------------------------------------------------------------------------ */
      fifthRow = (new XString("")).alignCenter(lineWidth, Const.CHAR_DOUBLE_UP_AND_HORIZONTAL).toString();
      /*.
      ==========================================================================================
      write it out to the console
      ------------------------------------------------------------------------------------------ */
      System.out.println();
      System.out.println();
      System.out.println(firstRow);
      System.out.println(secondRow);
      System.out.println(thirdRow);
      System.out.println(fourthRow);
      System.out.println(fifthRow);
      System.out.println();
      /*.
      ==========================================================================================
      flush and close the output
      ------------------------------------------------------------------------------------------ */
      System.out.flush();
      System.out.close();
      }



   }  // class BatBanner



   /*:.
   ==============================================================================================================
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[  Notes  ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   ============================================================================================================== */
   /*:                                    
   ====================================================================================================
   [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
   ==================================================================================================== *//**
   This method
   => -> --
   c  c  c  c  c  c  c

   <P><B>Implementation: </B><A HREF="BatBanner.java.html#012">View source</A>

   @return
      This method returns

   @exception
      xx is thrown when
   @exception
      yy is thrown when

   @param
      pX (optional)(input/output)(output) is the
   @param
      pY (optional)(input/output)(output) is the
   *//*
   ---------------------------------------------------------------------------------------------------- */
      /*.
      ==========================================================================================
      ------------------------------------------------------------------------------------------ */
   /*:.
   ==============================================================================================================
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@[  Section Level 0 Banner  ]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[  Section Level 1 Banner  ]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   :::::::::::::::::::::::::::::::::::::::::[  Section Level 2 Banner  ]:::::::::::::::::::::::::::::::::::::::::
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
   -----------------------------------------[  Section Level 3 Banner  ]-----------------------------------------
   ============================================================================================================== */
   /*:.
   ==============================================================================================================
                                            [  Section Level 4 Banner  ]
   ============================================================================================================== */