Created
July 30, 2014 15:51
-
-
Save mikeseif/c2575e12b7c876f431ea to your computer and use it in GitHub Desktop.
Logging a FileStream
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
private void logFileStream(FileInputStream fis) { | |
BufferedReader reader = new BufferedReader(new InputStreamReader(fis)); | |
StringBuilder sb = new StringBuilder(); | |
String line = null; | |
try { | |
while ( (line = reader.readLine()) != null) { | |
sb.append(line); | |
} | |
Log.d("FILESTREAM", sb.toString()); | |
reader.close(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment