Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
moust committed May 9, 2014
1 parent 28f5e74 commit 90b82d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/android/XAPKReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ private static PluginResult readFile(Context ctx, String filename, int mainVersi
return null;
}

// Read file
InputStream inputStream = fileDescriptor.createInputStream();
String contentType = URLConnection.guessContentTypeFromStream(inputStream);

// // Read file
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int read = 0;
Expand All @@ -142,6 +140,9 @@ private static PluginResult readFile(Context ctx, String filename, int mainVersi
}
os.flush();

// get file content type
String contentType = URLConnection.guessContentTypeFromStream(inputStream);

PluginResult result;
switch (resultType) {
case PluginResult.MESSAGE_TYPE_STRING:
Expand Down

0 comments on commit 90b82d4

Please sign in to comment.