Show / Hide Table of Contents

    Namespace Cursively

    Classes

    Csv

    Contains helper methods for CSV processing.

    CsvAsyncInput

    Helpers to create inputs that describe CSV data streams asynchronously.

    CsvReaderVisitorBase

    Base class for listeners that process a stream of RFC 4180 (CSV) tokens from an instance of CsvTokenizer.

    CsvReaderVisitorWithUTF8HeadersBase

    Intermediate base class for CSV reader visitors that don't want to have to implement header handling by themselves.

    Instances of this class are tied to a single CSV stream and cannot be reused or reset for use with other CSV streams.

    Each instance of this visitor has an upper-bound on the maximum number of headers and on the maximum length of each header. CSV streams that exceed these limits will cause this class to throw exceptions, and behavior of a particular instance is undefined once this happens.

    CsvSyncInput

    Helpers to create inputs that describe CSV data streams synchronously.

    CsvTokenizer

    Tokenizes a byte stream into CSV fields. The processing follows the guidelines set out in RFC 4180 unless and until the stream proves to be in an incompatible format, in which case a set of additional rules kick in to ensure that all streams are still compatible.

    The byte stream is tokenized according to the rules of the ASCII encoding. This makes it compatible with any encoding that encodes 0x0A, 0x0D, 0x22, and 0x2C the same way that ASCII encodes them. UTF-8 and Extended ASCII SBCS are notable examples of acceptable encodings. UTF-16 is a notable example of an unacceptable encoding; trying to use this class to process text encoded in an unacceptable encoding will yield undesirable results without any errors.

    All bytes that appear in the stream except 0x0A, 0x0D, 0x22, and 0x2C are unconditionally treated as data and passed through as-is. It is the consumer's responsibility to handle (or not handle) NUL bytes, invalid UTF-8, leading UTF-8 BOM, or any other quirks that come with the territory of text processing.

    CursivelyDataStreamException

    Serves as the base class for exceptions thrown by this library to indicate problems with the actual contents of a CSV stream.

    CursivelyExtraDataFieldsException

    Raised by CsvReaderVisitorWithUTF8HeadersBase, by default, when a data record contains more fields than the header record.

    CursivelyHeaderIsTooLongException

    Raised by CsvReaderVisitorWithUTF8HeadersBase when the length of a header exceeds the configured maximum.

    CursivelyHeadersAreNotUTF8Exception

    Raised by CsvReaderVisitorWithUTF8HeadersBase, by default, when the header record contains invalid UTF-8 bytes.

    CursivelyMissingDataFieldsException

    Raised by CsvReaderVisitorWithUTF8HeadersBase, by default, when a data record contains fewer fields than the header record.

    CursivelyTooManyHeadersException

    Raised by CsvReaderVisitorWithUTF8HeadersBase when the number of headers exceeds the configured maximum.

    Back to top Generated by DocFX