diff options
author | Bilal Alsharifi <bilal.alsharifi@gmail.com> | 2020-12-09 17:12:05 -0500 |
---|---|---|
committer | Bilal Alsharifi <bilal.alsharifi@gmail.com> | 2020-12-09 17:12:05 -0500 |
commit | 5173ec77206da3ca1a3929bf14ff6196bdd0dc3e (patch) | |
tree | d430be74cb0714ad552ed8d42ed8f26d3ec6ae86 /javaSE | |
parent | 207b4546328bbb360151816b305c5d654e3ea076 (diff) | |
download | sdl_android-5173ec77206da3ca1a3929bf14ff6196bdd0dc3e.tar.gz |
Update logs and comments in FileManager
Diffstat (limited to 'javaSE')
-rw-r--r-- | javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/FileManager.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/FileManager.java b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/FileManager.java index 8239a9310..0338f0d43 100644 --- a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/FileManager.java +++ b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/FileManager.java @@ -50,15 +50,7 @@ import java.nio.file.Files; * <p> * Note: This class must be accessed through the SdlManager. Do not instantiate it by itself. <br> * <p> - * The SDLFileManager uploads files and keeps track of all the uploaded files names during a session. <br> - * <p> - * We need to add the following struct: SDLFile<br> - * <p> - * It is broken down to these areas: <br> - * <p> - * 1. Getters <br> - * 2. Deletion methods <br> - * 3. Uploading Files / Artwork + * The FileManager uploads files and keeps track of all the uploaded files names during a session. <br> */ public class FileManager extends BaseFileManager { @@ -82,19 +74,18 @@ public class FileManager extends BaseFileManager { try { inputStream = new FileInputStream(file.getFilePath()); } catch (FileNotFoundException e) { - e.printStackTrace(); + DebugTool.logError(TAG, String.format("File at %s cannot be found.", file.getFilePath())); } } else if (file.getURI() != null) { try { inputStream = file.getURI().toURL().openStream(); } catch (IOException e) { - e.printStackTrace(); + DebugTool.logError(TAG, String.format("File at %s cannot be found.", file.getURI())); } } else if (file.getFileData() != null) { inputStream = new ByteArrayInputStream(file.getFileData()); } else { - throw new IllegalArgumentException("The SdlFile to upload does " + - "not specify its resourceId, Uri, or file data"); + throw new IllegalArgumentException("The SdlFile to upload does not specify its path, URI, or file data"); } return inputStream; |