Last active
December 20, 2015 13:19
-
-
Save Kozlov-V/6138183 to your computer and use it in GitHub Desktop.
file to inputstream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File file = ... | |
InputStream in = null; | |
try { | |
in = new BufferedInputStream(new FileInputStream(file)); | |
} catch (FileNotFoundException e1) { | |
e1.printStackTrace(); | |
} finally { | |
if (in != null) { | |
try { | |
in.close(); | |
} catch (IOException e1) { | |
e1.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment