Fungsi Konversi InputStream ke String
public String convertInputStreamtoString (InputStream in) throws IOException {
StringBuffer out = new StringBuffer();
byte[] b = new byte[4096];
for (int n; (n = in.read(b)) != -1;) {
out.append(new String(b, 0, n));
}
return out.toString();
}
Advertisement
No comments yet.
Leave a Reply
-
Recent
-
Links
-
Archives
- March 2009 (2)
- February 2009 (1)
- December 2008 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS