1 package com.thoughtworks.xstream.io; 2 3 import com.thoughtworks.xstream.converters.ErrorWriter; 4 5 import java.util.Iterator ; 6 7 12 public abstract class ReaderWrapper implements HierarchicalStreamReader { 13 14 protected HierarchicalStreamReader wrapped; 15 16 protected ReaderWrapper(HierarchicalStreamReader reader) { 17 this.wrapped = reader; 18 } 19 20 public boolean hasMoreChildren() { 21 return wrapped.hasMoreChildren(); 22 } 23 24 public void moveDown() { 25 wrapped.moveDown(); 26 } 27 28 public void moveUp() { 29 wrapped.moveUp(); 30 } 31 32 public String getNodeName() { 33 return wrapped.getNodeName(); 34 } 35 36 public String getValue() { 37 return wrapped.getValue(); 38 } 39 40 public String getAttribute(String name) { 41 return wrapped.getAttribute(name); 42 } 43 44 public String getAttribute(int index) { 45 return wrapped.getAttribute(index); 46 } 47 48 public int getAttributeCount() { 49 return wrapped.getAttributeCount(); 50 } 51 52 public String getAttributeName(int index) { 53 return wrapped.getAttributeName(index); 54 } 55 56 public Iterator getAttributeNames() { 57 return wrapped.getAttributeNames(); 58 } 59 60 public Object peekUnderlyingNode() { 61 return wrapped.peekUnderlyingNode(); 62 } 63 64 public void appendErrors(ErrorWriter errorWriter) { 65 wrapped.appendErrors(errorWriter); 66 } 67 68 public void close() { 69 wrapped.close(); 70 } 71 72 public HierarchicalStreamReader underlyingReader() { 73 return wrapped.underlyingReader(); 74 } 75 } 76 | Popular Tags |