Skip to content

Commit

Permalink
Merge pull request thinkgem#284 from QinChery/patch-5
Browse files Browse the repository at this point in the history
Update StreamUtils.java
  • Loading branch information
think-gem committed Jun 1, 2016
2 parents 3e7f463 + 9a4d03d commit 67099d2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ public static InputStream byteTOInputStream(byte[] in) throws Exception {
*/
public static String byteTOString(byte[] in) {

String result = null;
InputStream is = null;
try {
is = byteTOInputStream(in);
result = InputStreamTOString(is, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
return InputStreamTOString(is, "UTF-8");
return result;
}
/**
* 将byte数组转换成String
Expand Down Expand Up @@ -274,4 +276,4 @@ public static ByteArrayOutputStream getByteArrayOutputStream() {
return new ByteArrayOutputStream();
}

}
}

0 comments on commit 67099d2

Please sign in to comment.