tagtraum industries
Author: Hendrik Schreiber (hs@tagtraum.com)
Description: tagtraum industries - finest java technology.
Keywords: sixbs jsiege Hendrik Schreiber jspexecutor api web based application java servlet servlet http webserver http/1.1 server jo! framework WebApp EJB JSDK

| # sixbs ## What is sixbs? sixbs is a little library capable of writing beans to XML using their public properties. sixbs is especially suited for writing configuration data or sending data over the network. Contrary to normal Java serialization it is readable (i.e. you can easily edit it with your favourite text editor) and it is independent from class versions. This means that a new version of a class can be initialized with data from the old class, as long as it has the same or more setter methods. This means that your serialized data is safe even when update your application classes. sixbs is simple. You don't have to specify a DTD. Most classes are serializable right away. For those that cannot be serialized easily, you can write a simple Adapter class or implement the SIXBSSerializable interface that specifies which getter values should be serialized. ## How does sixbs work? Each property that has a getter and a setter method is used in the serialization process. Some classes are serialized as literals. These are all primitives, their corresponding classes (`java.lang.Float`, `java.lang.Long`, etc), String and URL. This list might grow in the future. All other classes are asked for their properties and these are written to XML. Only classes that have a no arg constructor may be serialized this way. If you need to serialize a class that does not have a default constructor you need to write a com.tagtraum.sixbs.Adapter. Some prewritten Adapters can be found in the `com.tagtraum.sixbs.adapters` package and its subpackages. If you want to serialize only some of the properties of an object you may implement the com.tagtraum.sixbs.SIXBSSerializable interface. ## Example It is really simple to use sixbs. Just write your objects with a SIXBSWriter to an OutputStream or with a Writer. If you want to read the object again, take a SIXBSReader and simply read from a Reader or InputStream.
    MyBean b1 = new MyBean();
    SIXBSWriter out = new SIXBSWriter(new FileWriter("myBean.xml"));
    // serialize b1
    out.write(b1);
    out.close();
    SIXBSReader in = new SIXBSReader(new FileReader("myBean.xml"));
    // de-serialize b2
    MyBean b2 = (MyBean)in.readObject();
For further info please see the provided javadocs ## Contributing sixbs is published under the LGPL. Besides the copyleft issues, this means that you are very welcome to contribute! I am especially interested in bundling more Adapters for standard JDK classes in future releases. #