Package com.liferay.util.lang

Examples of com.liferay.util.lang.ArrayWrapper


public class Serializer {

  public static Object[] readArray(String xml) throws CastorException {
    Reader reader = new StringReader(xml);

    ArrayWrapper aw;
    try {
      aw = (ArrayWrapper)Unmarshaller.unmarshal(ArrayWrapper.class, reader);
    } catch (MarshalException e) {
      Logger.error(Serializer.class, e.getMessage(), e);
      throw new CastorException(e.getMessage());
    } catch (ValidationException e) {
      Logger.error(Serializer.class, e.getMessage(), e);
      throw new CastorException(e.getMessage());
    }
    return aw.getArray();
  }
View Full Code Here


    }
    return aw.getArray();
  }

  public static String writeArray(Object[] array) throws CastorException {
    ArrayWrapper aw = new ArrayWrapper();
    aw.setArray(array);

    Writer writer = new StringWriter();
    try {
      Marshaller.marshal(aw, writer);
    } catch (MarshalException e) {
View Full Code Here

TOP

Related Classes of com.liferay.util.lang.ArrayWrapper

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.