1 package com.thoughtworks.xstream.io; 2 3 8 public abstract class WriterWrapper implements HierarchicalStreamWriter { 9 10 protected HierarchicalStreamWriter wrapped; 11 12 protected WriterWrapper(HierarchicalStreamWriter wrapped) { 13 this.wrapped = wrapped; 14 } 15 16 public void startNode(String name) { 17 wrapped.startNode(name); 18 } 19 20 public void endNode() { 21 wrapped.endNode(); 22 } 23 24 public void addAttribute(String key, String value) { 25 wrapped.addAttribute(key, value); 26 } 27 28 public void setValue(String text) { 29 wrapped.setValue(text); 30 } 31 32 public void flush() { 33 wrapped.flush(); 34 } 35 36 public void close() { 37 wrapped.close(); 38 } 39 40 public HierarchicalStreamWriter underlyingWriter() { 41 return wrapped.underlyingWriter(); 42 } 43 44 } 45 | Popular Tags |