01: /*
02: * Copyright (C) 2006 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 15. July 2006 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.tools.benchmark;
13:
14: import java.io.OutputStream;
15: import java.io.InputStream;
16:
17: /**
18: * Provides an abstraction above the product used to perform the serialization/deserialization
19: * in the benchmarks.
20: *
21: * @author Joe Walnes
22: * @see Harness
23: */
24: public interface Product {
25:
26: /**
27: * Serialize an object to a stream.
28: */
29: void serialize(Object object, OutputStream output) throws Exception;
30:
31: /**
32: * Deserialize an object from a stream.
33: */
34: Object deserialize(InputStream input) throws Exception;
35:
36: }
|