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); |