%metaHeader
   
by Kasper B. Graversen, 2006-2008

%menuBlock

Motivation

The main motivation for Super Csv is to be the best, fastest and most programmer friendly free CSV package for Java. Super Csv's unique features raises the bar and sets a new standard for CSV packages. Super Csv is designed around solid Object-oriented principles, and thus aims to leverage your Object-oriented code, making it easier to write and maintain.

If you are unsure about what the CSV format is, please read my specification which covers my understanding of the concept: The CSV format specification.

Super Csv offers the following features not found together in other CSV packages

  • The ability to read/write POJO beans, Maps and String lists.
  • Automatic "CSV encoding" of output on a per need basis. Thus when you write special characters such as , or " Super CSV ensure the content is properly escaped (according to my CSV specification).
  • The ability to easily convert input/output to integers, dates, big decimals, trimming strings, etc...
  • The ability to easily verify data conforms to some specification, such as number ranges, string sizes, uniqueness and even optional columns.
  • The ability to read/write data from anywhere in any encoding. As long as you provide a Reader or a Writer.
  • Support for Windows, MAC and Linux line breaks.
  • Configurable separation character, space character and end of line character (for writing files to different platforms)
  • Operates on streams rather than filenames, enabling you to read/write CSV files e.g. over a network connection.
  • Supporting partial reading and writing of objects, maps and arrays with easy setting of default values.
  • Supporting on-the-fly generation implementations of bean interfaces when using the BeanReader
When combined, these features enables you to express clear and robust code for handling CSV files.

My years in industry dealing with CSV files (among other things ;-), has enabled me to identify a number of limitations with existing CSV packages. These limitations led me to write SuperCsv. My main critisism of existing CSV packages is that reading and writing takes outset in operating on lists of strings. What you really needed is the ability to operate on a fan of different types of objects. Moreover, often you need to restrict input/output data such as minimum and maximum sizes, or numeric ranges. Or maybe you are reading image names, and want to ensure you do not read names contain the characters ":", " ", "/", "^", "%". SuperCSV deals with all these and many other issues. And should you have a constraint not readily expressible in the package, new cell processors can easily be constructed. Further more, you don't want to "CSV encode" strings you write. Should they happen to contain characters that needs escaping, then the CSV package should take care of this automatically!

The underlying implementation of Super Csv has been written in an extendible fashion, hence new readers/writters and cell processors can easily be supported. The IoC (Inversion of Control) implementation patterns has been enforced, eradicating long-lived mistakes such as using filenames as arguments rather than Reader and Writer objects. Design patterns such as "Chain of responsibility", "The Null object pattern" can also be found in the code. Feel free to have a look.

If you do not agree that Super CSV is the best, fastest and most programmer friendly free CSV package for Java, please tell me why, and I'll attempt to rectify your problems!

For version information and downloads go to the download page

See also other interesting projects by me:

Also see my great site for technical info and blogging: http://firstclassthoughts.co.uk





%googleAddsBottom