首页 > 代码库 > code异常处理
code异常处理
private void copyPrivateRawResuorceToPubliclyAccessibleFile() {
InputStream inputStream = null;
FileOutputStream outputStream = null;
try {
XX
/*异常处理*/
try {
while ((length = inputStream.read(buffer)) > 0){
outputStream.write(buffer, 0, length);
}
} catch (IOException ioe) {
/* ignore */
}
} catch (FileNotFoundException fnfe) {
/* ignore */
} finally {
/*异常处理*/
try {
if (inputStream != null)
inputStream.close();
} catch (IOException ioe) {
/* ignore */
}
/*异常处理*/
try {
if (outputStream != null)
outputStream.close();
} catch (IOException ioe) {
/* ignore */
}
}
}
code异常处理