1 57 58 package org.apache.soap.util; 59 60 import java.io.*; 61 62 68 public class IOUtils { 69 static boolean debug = false; 71 72 74 public static String getStringFromReader (Reader reader) throws IOException { 75 BufferedReader bufIn = new BufferedReader(reader); 76 StringWriter swOut = new StringWriter(); 77 PrintWriter pwOut = new PrintWriter(swOut); 78 String tempLine; 79 80 while ((tempLine = bufIn.readLine()) != null) { 81 pwOut.println(tempLine); 82 } 83 84 pwOut.flush(); 85 86 return swOut.toString(); 87 } 88 } 89 | Popular Tags |