首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

将字节数组转向输出流

2012-10-27 
将字节数组转为输出流/** * 将字节数组转为输出流 ** @param b * @return */public static InputStream ge

将字节数组转为输出流

/** * 将字节数组转为输出流 *  * @param b * @return */public static InputStream getInputStreamFromBytes(byte[] b) {InputStream ret = null;try {if (b == null || b.length <= 0) {log.error("helper:the byte is null or is empty!");return ret;}ret = new ByteArrayInputStream(b);} catch (Exception e) {log.error("helper:get inputstream from bytes process error!");e.printStackTrace();}return ret;}

?

热点排行