Hello, just wanted to verify how this method works.
Is the size array 'byte' is 4096 slots big?
private String slurp (InputStream in) {
try {
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();
}
catch(Exception e) {
e.printStackTrace();
return null;
}
}
[edit]Disable smilies CR[/edit]
[ June 15, 2008: Message edited by: Campbell Ritchie ]