日期:2014-05-20 浏览次数:24908 次
InputStream in = null; // 这里是你已经存在的输入流
FileInputStream fin = null; // 转换后的文件输入流
// 如果是FileInputStream类型,进行转换
if (in instanceof FileInputStream) {
fin = (FileInputStream) in;
} else { // 否则,转型失败
throw new Exception();
}