No problem, i should have described my problem a little better. I'm using XStream in our project for marshalling/unmarshalling a XML. The XML file contains a large file as payload which size can be between 10KB-5MB. A major benefit of using PULL parser it doesn't consume a lot of memory for processing a large XML file (you know that). I think the currently provided AbstractPullReader/Writer class is only an adapter for push parsing. I can't rely on the AbstractPullReader/Writer to optimize the processing of the xml file part in my own converter. Here is an example:
public class SwappingFileConverter implements Converter
public boolean canConvert(Class clazz);
public void marshal(Object value, HierarchicalStreamWriter writer,
public Object unmarshal(HierarchicalStreamReader reader,
The SwappingFileConverter#unmarshal() method should return a File object and write the xml file-part into a specified file. What can i do in the unmarshal() method? I can get the content of the current node using AbstractPullReader.getValue(). It reads the full content into the memory but i wouldn't be necessary. The AbstractPullReader/Writer should provide a method for reading/writing a part of the current node's content (sream based concept). I think this will be backward compatible i doesn't affect any module expect the pull readers/writers.