FileUtils

com.anywherecommerce.android.sdk.util

Class FileUtils

  • java.lang.Object

  • com.anywherecommerce.android.sdk.util.FileUtils

  • public class <span class="typeNameLabel">FileUtils</span>
    extends java.lang.Object
    

    Created by Admin on 8/2/2017.

Constructor Summary

  Constructor and Description`<span class="memberNameLink">

FileUtils()`

Method Summary

  Modifier and TypeMethod and Description`static boolean````
  <span class="memberNameLink">

append(java.lang.String filename,
java.lang.String contentToWrite)
` `static boolean

delete(java.lang.String fileName) static  T````

deserializeFromFile(int resId,
java.lang.Class clazz)
`` static  T````

deserializeFromFile(java.lang.String filename,
java.lang.Class clazz,
boolean decrypt)
` `static boolean

exists(java.lang.String fileName) static java.lang.String``

getSafeFilename(java.lang.String originalName) static java.lang.String``

getSafePackageNameForFile(Context context) static java.lang.String``

readAllText(int rawResId) static java.lang.String``

readFromFile(java.lang.String filename) static java.lang.String````

readFromFile(java.lang.String filename,
boolean decrypt)
`` static boolean````

serializeToFile(java.lang.String filename,
java.lang.Object object,
boolean encrypt)
`` static boolean````

writeToFile(java.lang.String filename,
java.lang.String content)
`` static boolean````

writeToFile(java.lang.String filename,
java.lang.String content,
boolean encrypt)
```

Methods inherited from class java.lang.Object

        `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

FileUtils

        `public FileUtils()`

Method Detail

getSafeFilename

        `public static java.lang.String getSafeFilename(java.lang.String originalName)`

getSafePackageNameForFile

        `public static java.lang.String getSafePackageNameForFile(Context context)`

readAllText

        `public static java.lang.String readAllText(int rawResId)`

readFromFile

        `public static java.lang.String readFromFile(java.lang.String filename)`

readFromFile

        ```
        public static java.lang.String readFromFile(java.lang.String filename,
                                                    boolean decrypt)
        ```

exists

        `public static boolean exists(java.lang.String fileName)`

delete

        `public static boolean delete(java.lang.String fileName)`

writeToFile

        ```
        public static boolean writeToFile(java.lang.String filename,
                                          java.lang.String content)
        ```

writeToFile

        ```
        public static boolean writeToFile(java.lang.String filename,
                                          java.lang.String content,
                                          boolean encrypt)
        ```

serializeToFile

        ```
        public static boolean serializeToFile(java.lang.String filename,
                                              java.lang.Object object,
                                              boolean encrypt)
        ```

deserializeFromFile

        ```
        public static <T> T deserializeFromFile(java.lang.String filename,
                                                java.lang.Class<T> clazz,
                                                boolean decrypt)
        ```

deserializeFromFile

        ```
        public static <T> T deserializeFromFile(int resId,
                                                java.lang.Class<T> clazz)
        ```

append

        ```
        public static boolean append(java.lang.String filename,
                                     java.lang.String contentToWrite)
        ```