Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

orangesignal/orangesignal-csv

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

297 Commits
297 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrangeSignal CSV is a very flexible csv (comma-separated values) read and write library for Java.

The binary distributions includes the following third party software:
jLHA (LHA Library for Java).

Prerequisites

  • Java 1.6+
    OrangeSignal CSV is compiled for Java 1.6

Installation

Maven users

If you are using Maven, simply copy the following dependency into your pom.xml file. The artifact is hosted at Maven Central, and is standalone (no dependencies).

<dependency>
    <groupId>com.orangesignal</groupId>
    <artifactId>orangesignal-csv</artifactId>
    <version>2.2.1</version>
</dependency>

Examples

CSV entity class

@CsvEntity(header = true)
public class Customer {

    @CsvColumn(name = "name")
    public String name;

    @CsvColumn(name = "age")
    public Integer age;

}

example code

CsvConfig cfg = new CsvConfig(',', '"', '"');
cfg.setNullString("NULL");
cfg.setIgnoreLeadingWhitespaces(true);
cfg.setIgnoreTrailingWhitespaces(true);
cfg.setIgnoreEmptyLines(true);
cfg.setIgnoreLinePatterns(Pattern.compile("^#.*$"));
cfg.setVariableColumns(false);

List<Customer> list = new CsvEntityManager()
    .config(cfg)
    .load(Customer.class)
    .filter(new SimpleBeanFilter().in("name", "Smith", "Johnson").gt("age", 21))
    .offset(10)
    .limit(1000)
    .order(BeanOrder.desc("age"))
    .from(reader);

How to use

Sorry, it is japanese only for now.

License

About

CSV (comma-separated values) read and write library for Java.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.