comparison WebServiceExtensionsV1.1/WebServiceToolWorkflow_REST_SOAP/lib/SAWADLParser/src/edu/uga/cs/lsdis/meteors/wadls/util/IOUtils.java @ 0:049760c677de default tip

Galaxy WSExtensions added successfully
author uga-galaxy-group
date Tue, 05 Jul 2011 19:34:18 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:049760c677de
1 /*
2 * (c) Copyright IBM Corp 2001, 2005
3 */
4
5 package edu.uga.cs.lsdis.meteors.wadls.util;
6
7 import java.io.*;
8
9 /**
10 * This file is a collection of input/output utilities.
11 *
12 * @author Sanjiva Weerawarana
13 * @author Matthew J. Duftler
14 */
15 public class IOUtils {
16 // debug flag - generates debug stuff if true
17 static boolean debug = false;
18
19 //////////////////////////////////////////////////////////////////////////
20
21 public static String getStringFromReader (Reader reader) throws IOException {
22 BufferedReader bufIn = new BufferedReader(reader);
23 StringWriter swOut = new StringWriter();
24 PrintWriter pwOut = new PrintWriter(swOut);
25 String tempLine;
26
27 while ((tempLine = bufIn.readLine()) != null) {
28 pwOut.println(tempLine);
29 }
30
31 pwOut.flush();
32
33 return swOut.toString();
34 }
35 }
36