Package org.camunda.spin.spi

Examples of org.camunda.spin.spi.DataFormatWriter


    return dataFormat.getMapper().getCanonicalTypeName(deserializedObject);
  }

  protected byte[] serializeToByteArray(Object deserializedObject) throws Exception {
    DataFormatMapper mapper = dataFormat.getMapper();
    DataFormatWriter writer = dataFormat.getWriter();

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    OutputStreamWriter outWriter = new OutputStreamWriter(out, Context.getProcessEngineConfiguration().getDefaultCharset());
    BufferedWriter bufferedWriter = new BufferedWriter(outWriter);

    try {
      Object mappedObject = mapper.mapJavaToInternal(deserializedObject);
      writer.writeToWriter(bufferedWriter, mappedObject);
      return out.toByteArray();
    }
    finally {
      IoUtil.closeSilently(out);
      IoUtil.closeSilently(outWriter);
View Full Code Here

TOP

Related Classes of org.camunda.spin.spi.DataFormatWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.