Coverage Report - org.mule.transformer.simple.MuleMessageToByteArray
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleMessageToByteArray
0%
0/5
N/A
0
 
 1  
 /*
 2  
  * $Id: MuleMessageToByteArray.java 19250 2010-08-30 16:53:14Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 package org.mule.transformer.simple;
 11  
 
 12  
 import org.mule.api.MuleMessage;
 13  
 import org.mule.transformer.AbstractMessageTransformer;
 14  
 import org.mule.transformer.types.DataTypeFactory;
 15  
 
 16  
 import org.apache.commons.lang.SerializationUtils;
 17  
 
 18  
 /** TODO */
 19  
 public class MuleMessageToByteArray extends AbstractMessageTransformer
 20  
 {
 21  
     public MuleMessageToByteArray()
 22  0
     {
 23  0
         registerSourceType(DataTypeFactory.MULE_MESSAGE);
 24  0
         setReturnDataType(DataTypeFactory.BYTE_ARRAY);
 25  0
     }
 26  
 
 27  
     @Override
 28  
     public Object transformMessage(MuleMessage message, String outputEncoding)
 29  
     {
 30  0
         return SerializationUtils.serialize(message);
 31  
     }
 32  
 }