org.exoplatform.services.rest.transformer
Class JAXBOutputTransformer

java.lang.Object
  extended by org.exoplatform.services.rest.transformer.OutputEntityTransformer
      extended by org.exoplatform.services.rest.transformer.JAXBOutputTransformer
All Implemented Interfaces:
GenericEntityTransformer, GenericOutputEntityTransformer

public class JAXBOutputTransformer
extends OutputEntityTransformer

Write given Object OututStream using JAXB transformation. Java Architecture for XML Binding (JAXB) allows create and edit XML using familiar Java objects.
JAXB is particularly useful when the specification is complex and changing. This class can marshal Java Object to XML as stream.

Version:
$Id: $
Author:
Andrey Parfonov

Field Summary
 
Fields inherited from class org.exoplatform.services.rest.transformer.OutputEntityTransformer
transformerParameters
 
Constructor Summary
JAXBOutputTransformer()
           
 
Method Summary
 void writeTo(Object entity, OutputStream entityDataStream)
          Write entity to OutputStream.
 
Methods inherited from class org.exoplatform.services.rest.transformer.OutputEntityTransformer
addTransformerParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBOutputTransformer

public JAXBOutputTransformer()
Method Detail

writeTo

public final void writeTo(Object entity,
                          OutputStream entityDataStream)
                   throws IOException
Write entity to OutputStream.

Specified by:
writeTo in class OutputEntityTransformer
Parameters:
entity - the Object which should be writed
entityDataStream - the OutputStream
Throws:
IOException - Input/Output Exception


Copyright © 2009 eXo Platform SAS. All Rights Reserved.