/[projects]/miscJava/GenericJavaUtils/src/dk/thoerup/genericjavautils/HttpUtil.java
ViewVC logotype

Diff of /miscJava/GenericJavaUtils/src/dk/thoerup/genericjavautils/HttpUtil.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1355 by torben, Wed Apr 20 18:52:29 2011 UTC revision 1356 by torben, Wed Apr 20 19:05:01 2011 UTC
# Line 84  public class HttpUtil { Line 84  public class HttpUtil {
84                  }                  }
85          }          }
86                    
87            public static String getContentString(String  uri, int timeout) throws IOException {
88                    return getContentString(uri, timeout, "UTF-8");
89            }
90            
91            public static String getContentString(String  uri, int timeout, String encoding) throws IOException {
92                    byte[] buf = getContent(uri, timeout);
93                    return new String(buf, encoding);
94            }
95    
96          public static byte[] getContent(String uri, int timeout) throws IOException {          public static byte[] getContent(String uri, int timeout) throws IOException {
97                  URL url = new URL(uri);                  URL url = new URL(uri);

Legend:
Removed from v.1355  
changed lines
  Added in v.1356

  ViewVC Help
Powered by ViewVC 1.1.20