01: /*
02: * Copyright (C) 2007 XStream Committers.
03: * All rights reserved.
04: *
05: * The software in this package is published under the terms of the BSD
06: * style license a copy of which has been included with this distribution in
07: * the LICENSE.txt file.
08: *
09: * Created on 14. May 2007 by Guilherme Silveira
10: */
11: package com.thoughtworks.xstream;
12:
13: /**
14: * @author Guilherme Silveira
15: * @since upcoming
16: */
17: public class ReadOnlyXStream {
18:
19: private final XStream xstream;
20:
21: public ReadOnlyXStream(XStream xstream) {
22: this .xstream = xstream;
23: }
24:
25: public Object fromXML(String xml) {
26: return xstream.fromXML(xml);
27: }
28:
29: public String toXML(Object obj) {
30: return xstream.toXML(obj);
31: }
32: }
|