Class CSVFromPropertiesReader


  • public class CSVFromPropertiesReader
    extends CSVReader
    • Constructor Detail

      • CSVFromPropertiesReader

        public CSVFromPropertiesReader​(java.lang.String idAndNameRegexp,
                                       java.util.Map<java.lang.String,​java.lang.Integer> name2columns,
                                       boolean caseInsentitiveAttributeNames,
                                       int linesToBuffer,
                                       java.lang.String emptyCellValue,
                                       java.io.Reader reader)
    • Method Detail

      • readSrcLineFromStream

        protected java.lang.String readSrcLineFromStream()
        Description copied from class: CSVReader
        Reads next line from stream. If stream has reached end, null is returned and finished flag will be set.
        Overrides:
        readSrcLineFromStream in class CSVReader
        Returns:
        next line from stream or null
      • toCsv

        protected java.lang.String toCsv​(java.util.Map<java.lang.Integer,​java.lang.String> csv)
      • parseNextCSVLine

        protected java.util.Map<java.lang.Integer,​java.lang.String> parseNextCSVLine()
                                                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • isComplete

        protected boolean isComplete​(java.util.Map<java.lang.Integer,​java.lang.String> csvLine)
      • parseNextProperty

        protected de.hybris.platform.util.CSVFromPropertiesReader.ParsedProperty parseNextProperty()
                                                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readNextPropertyLine

        protected java.lang.String readNextPropertyLine()
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • removeFromBuffer

        protected void removeFromBuffer​(java.lang.String id)
      • addPropertyToCSVLine

        protected java.util.Map<java.lang.Integer,​java.lang.String> addPropertyToCSVLine​(de.hybris.platform.util.CSVFromPropertiesReader.ParsedProperty property)
      • lookupPosition

        public java.lang.Integer lookupPosition​(de.hybris.platform.util.CSVFromPropertiesReader.ParsedProperty property)
      • getOrCreateCSVLineForID

        public java.util.Map<java.lang.Integer,​java.lang.String> getOrCreateCSVLineForID​(java.lang.String id)
      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: CSVReader
        Close the reader. Should be always called if parsing is finished.
        Overrides:
        close in class CSVReader
        Throws:
        java.io.IOException - throws if error occurred
      • closeQuietly

        public void closeQuietly()
        Description copied from class: CSVReader
        Close the reader quietly. The IOException will be catched and if the debug mode is enabled the exeption message is written to the log.
        Overrides:
        closeQuietly in class CSVReader