Class CSVFromPropertiesReader

java.lang.Object
de.hybris.platform.util.CSVReader
de.hybris.platform.util.CSVFromPropertiesReader

public class CSVFromPropertiesReader extends CSVReader
  • Constructor Details

    • CSVFromPropertiesReader

      public CSVFromPropertiesReader(String idAndNameRegexp, Map<String,Integer> name2columns, boolean caseInsentitiveAttributeNames, int linesToBuffer, String emptyCellValue, Reader reader)
  • Method Details

    • builder

    • readSrcLineFromStream

      protected 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 String toCsv(Map<Integer,String> csv)
    • parseNextCSVLine

      protected Map<Integer,String> parseNextCSVLine() throws IOException
      Throws:
      IOException
    • isComplete

      protected boolean isComplete(Map<Integer,String> csvLine)
    • parseNextProperty

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

      protected String readNextPropertyLine() throws IOException
      Throws:
      IOException
    • removeFromBuffer

      protected void removeFromBuffer(String id)
    • addPropertyToCSVLine

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

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

      public Map<Integer,String> getOrCreateCSVLineForID(String id)
    • close

      public void close() throws IOException
      Description copied from class: CSVReader
      Close the reader. Should be always called if parsing is finished.
      Overrides:
      close in class CSVReader
      Throws:
      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