![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Affects Versions:
|
1.3.1 |
|
Assignee:
|
Joerg Schaible
|
|
Components:
|
Core |
|
Created:
|
31/May/12 4:06 AM
|
|
Description:
|
Hi,
I have an XML which I created using XStream. This file is formatted like this:
<entity>
......details of entity....
</entity>
<entity>
......details of entity....
</entity>
<entity>
......details of entity....
</entity>
......
Basically I obtained this file by serializing objects from a list one-by-one. Now, I want to read this file in the same way (one-by-one). This is because I don't want to load 1Gb od data into memory and after that process each entity. I want to read first entry (entity) and process it. After that I want to read the second entry (entity) and process it... and so on. Is there any way to obtain this using XStream? I managed to read the first entry using this code:
InputStream inputStream = new FileInputStream(path);
XStream stream = new XStream(new StaxDriver());
stream.processAnnotations(Entity.class);
while (true) {
Entity entity = (Entity) stream.fromXML(inputStream);
}
but I can't move to the next one.
Thank you
|
|
Project:
|
XStream
|
|
Priority:
|
Major
|
|
Reporter:
|
Adrian Buciuman
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email