Package io.atlasmap.csv.core
Class CsvFieldReader
java.lang.Object
io.atlasmap.csv.core.CsvFieldReader
- All Implemented Interfaces:
AtlasFieldReader
It accepts InputStream as a document in order to process big files efficiently.
It uses the mark operation of the InputStream to reset the stream and read consecutive fields.
If InputStream does not support the mark operation it is wrapped in BufferedInputStream.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(AtlasInternalSession session) Reads only the first row of the document.void
setDocument
(InputStream inputStream)
-
Constructor Details
-
CsvFieldReader
-
-
Method Details
-
setDocument
-
read
- Specified by:
read
in interfaceAtlasFieldReader
- Throws:
AtlasException
-
readSchema
Reads only the first row of the document. If firstRecordAsHeader is set to true it uses column names for field names, otherwise it uses an index starting from 0.- Returns:
Document
built from CSV- Throws:
AtlasException
- if it fails
-