JSefa (Java Simple exchange format api) is a simple library for stream-based serialization of java objects to XML, CSV, and FLR (extensible to other formats) and back again using an iterator-style interface independent of the serialization format. The mapping between java object types and types of the serialization format (e. g. xml complex element types) can be defined either by annotating the java classes or programmatically using a simple API. The current implementation supports XML, CSV and FLR (Fixed Length Record) - for XML it is based on JSR 173.
JSR 173 (Stax) is a popular stream-based XML API for java providing an iterator-style interface ("pull"-mechanism in contrast to the "push"-mechanism provided by SAX). But JSR 173 defines a low-level API not designed for directly serializing java objects and back again. On the other hand traditional high-level APIs like JAXB or Castor are not stream-based, so that reading a xml document will generate java objects holding the data of the complete xml document in memory at the same time. Even the integration of StAX into JAXB 2.0 is only a first step to high-level streaming, as two independent APIs have to be used in parallel. JSefa provides a convenient and performant approach to high-level streaming using an iterator-style interface. It has a layered API with the top layer allowing the streaming to be independent of the serialization format type (XML, CSV or whatever). The current implementation provides support for XML, CSV, and FLR.