Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) 2010-2011. Axon Framework
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.axonframework.serializer;
Serializer that uses XStream to serialize and deserialize arbitrary objects. The XStream instance is configured to deal with the Classes used in Axon Framework in the most compact fashion.

When running on a Sun JVM, XStream does not pose any restrictions on classes to serialize. On other JVM's, however, you need to either implement Serializable, or provide a default constructor (accessible under the JVM's security policy). That means that for portability, you should do either of these two.

Deprecated:
Use XStreamSerializer instead
Author(s):
Allard Buijze
Since:
0.6
See also:
com.thoughtworks.xstream.XStream
public class GenericXStreamSerializer extends XStreamSerializer {

    
Initialize a generic serializer using the UTF-8 character set. A default XStream instance (with com.thoughtworks.xstream.io.xml.XppDriver) is used to perform the serialization.
    public GenericXStreamSerializer() {
        super();
    }

    
Initialize a generic serializer using the UTF-8 character set. The provided XStream instance is used to perform the serialization.

Parameters:
xStream XStream instance to use
    public GenericXStreamSerializer(XStream xStream) {
        super(xStream);
    }

    
Initialize the serializer using the given charset. A default XStream instance (with com.thoughtworks.xstream.io.xml.XppDriver) is used to perform the serialization.

Parameters:
charset The character set to use
    public GenericXStreamSerializer(Charset charset) {
        super(charset);
    }

    
Initialize the serializer using the given charset and xStream instance. The xStream instance is configured with several converters for the most common types in Axon.

Parameters:
charset The character set to use
xStream The XStream instance to use
    public GenericXStreamSerializer(Charset charsetXStream xStream) {
        super(charsetxStream);
    }
New to GrepCode? Check out our FAQ X