Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public boolean fillFrom(org.neo4j.csv.reader.Chunker chunker) throws java.io.IOException
        public override bool FillFrom(Chunker chunker)
        {
            if (chunker.NextChunk(_processingChunk))
            {
                CloseCurrentParser();
                this._visitor = null;
                this._parser  = new CsvInputParser(seeker(_processingChunk, _config), _delimiter, _idType, _header.clone(), _badCollector, _extractors);
                return(_header.entries().Length != 0);
            }
            return(false);
        }
Esempio n. 2
0
        internal CsvInputIterator(CharReadable stream, Decorator decorator, Header header, Configuration config, IdType idType, Collector badCollector, Extractors extractors, int groupId)
        {
            this._stream    = stream;
            this._decorator = decorator;
            this._groupId   = groupId;
            if (config.multilineFields())
            {
                // If we're expecting multi-line fields then there's no way to arbitrarily chunk the underlying data source
                // and find record delimiters with certainty. This is why we opt for a chunker that does parsing inside
                // the call that normally just hands out an arbitrary amount of characters to parse outside and in parallel.
                // This chunker is single-threaded, as it was previously too and keeps the functionality of multi-line fields.
                this._chunker = new EagerParserChunker(stream, idType, header, badCollector, extractors, 1_000, config, decorator);
//JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter:
                this._realInputChunkSupplier = EagerCsvInputChunk::new;
            }
            else
            {
                this._chunker = new ClosestNewLineChunker(stream, config.bufferSize());
                this._realInputChunkSupplier = () => new LazyCsvInputChunk(idType, config.delimiter(), badCollector, extractors(config), _chunker.newChunk(), config, decorator, header);
            }
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public boolean fillFrom(org.neo4j.csv.reader.Chunker chunker) throws java.io.IOException
        public override bool FillFrom(Chunker chunker)
        {
            return(chunker.NextChunk(this));
        }
Esempio n. 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public boolean fillFrom(org.neo4j.csv.reader.Chunker chunker) throws java.io.IOException
        public override bool FillFrom(Chunker chunker)
        {
            return(_actual.fillFrom(chunker));
        }