Class ControlInfo


  • class ControlInfo
    extends java.lang.Object
    • Constructor Detail

      • ControlInfo

        public ControlInfo()
                    throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getPropertyValue

        java.lang.String getPropertyValue​(java.lang.String aKey)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadDefaultValues

        private void loadDefaultValues()
      • getCurrentVersion

        java.lang.String getCurrentVersion()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFormat

        java.lang.String getFormat()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getColumnWidths

        int[] getColumnWidths()
      • getFieldSeparator

        java.lang.String getFieldSeparator()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFieldStartDelimiter

        java.lang.String getFieldStartDelimiter()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFieldEndDelimiter

        java.lang.String getFieldEndDelimiter()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getRecordSeparator

        java.lang.String getRecordSeparator()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHasDelimiterAtEnd

        boolean getHasDelimiterAtEnd()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getHasDelimeterAtEndString

        java.lang.String getHasDelimeterAtEndString()
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getNullString

        java.lang.String getNullString()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getColumnDefinition

        java.lang.String getColumnDefinition()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • mapFromUserFriendlyFieldDelimiters

        private java.lang.String mapFromUserFriendlyFieldDelimiters​(java.lang.String aDelimiter)
      • commonToFieldAndRecordDelimiters

        private java.lang.String commonToFieldAndRecordDelimiters​(java.lang.String aDelimiter,
                                                                  java.lang.String specialChars,
                                                                  char replacementChar)
      • mapFromUserFriendlyRecordDelimiters

        private java.lang.String mapFromUserFriendlyRecordDelimiters​(java.lang.String aDelimiter)
      • getDataCodeset

        java.lang.String getDataCodeset()
                                 throws java.lang.Exception
        Returns:
        Code set, can return null for use the default code set.
        Throws:
        java.lang.Exception
      • getCurrentProperties

        java.util.Properties getCurrentProperties()
                                           throws java.lang.Exception
        read the control file properties into a local variable which is used later on In case there is no control file, read the default values for these properties
        Throws:
        java.lang.Exception - if there is an error
      • setColumnWidths

        public void setColumnWidths​(java.lang.String columnWidths)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setFieldSeparator

        public void setFieldSeparator​(java.lang.String fieldSeperator)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setFieldStartDelimiter

        public void setFieldStartDelimiter​(java.lang.String fsdl)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setFieldEndDelimiter

        public void setFieldEndDelimiter​(java.lang.String fedl)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setRecordSeparator

        public void setRecordSeparator​(java.lang.String recordSeperator)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setHasDelimiterAtEnd

        public void setHasDelimiterAtEnd​(java.lang.String hasDelimeterAtEnd)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setNullString

        public void setNullString​(java.lang.String nullString)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setcolumnDefinition

        public void setcolumnDefinition​(java.lang.String columnDefinition)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setDataCodeset

        public void setDataCodeset​(java.lang.String codeset)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setCharacterDelimiter

        public void setCharacterDelimiter​(java.lang.String charDelimiter)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setControlProperties

        public void setControlProperties​(java.lang.String characterDelimiter,
                                         java.lang.String columnDelimiter,
                                         java.lang.String codeset)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • validateDelimiters

        private void validateDelimiters()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception