public EagerParserChunker(CharReadable reader, IdType idType, Header header, Collector badCollector, Extractors extractors, int chunkSize, Configuration config, Decorator decorator) { this._chunkSize = chunkSize; this._decorator = decorator; this._seeker = charSeeker(reader, config, true); this._parser = new CsvInputParser(_seeker, config.delimiter(), idType, header, badCollector, extractors); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: static Header extractHeader(org.neo4j.csv.reader.CharReadable stream, Header.Factory headerFactory, IdType idType, Configuration config, org.neo4j.unsafe.impl.batchimport.input.Groups groups) throws java.io.IOException internal static Header ExtractHeader(CharReadable stream, Header.Factory headerFactory, IdType idType, Configuration config, Groups groups) { if (!headerFactory.Defined) { char[] firstLineBuffer = Readables.extractFirstLineFrom(stream); // make the chunk slightly bigger than the header to not have the seeker think that it's reading // a value bigger than its max buffer size ChunkImpl firstChunk = new ChunkImpl(copyOf(firstLineBuffer, firstLineBuffer.Length + 1)); firstChunk.Initialize(firstLineBuffer.Length, stream.SourceDescription()); CharSeeker firstSeeker = Seeker(firstChunk, config); return(headerFactory.Create(firstSeeker, config, idType, groups)); } return(headerFactory.Create(null, null, null, null)); }