throws IOException {
if (inputStreamObj != null) {
Writer writer = new StringWriter();
char[] buffer = new char[1024];
try {
Reader reader = new BufferedReader(new InputStreamReader(
inputStreamObj, "UTF-8"));
int n;
while ((n = reader.read(buffer)) != -1) {
writer.write(buffer, 0, n);
}
} finally {
inputStreamObj.close();
}
return writer.toString();
} else {
return "";
}
}
No comments:
Post a Comment
If you have any doubts or questions, please let us know.