I want to written a object holding data read from xml
String data = null;
while ((data = stdInput.readLine()) != null) {
logger.info("Data:"+data);
}
i want to return a obj holding the complete data read in while loop,how would i do that?
its java
You can use a StringBuffer to combine all the lines, then output to a String when your loop is done: