Class TransferFileUtil

java.lang.Object
com.amilesend.onedrive.connection.file.TransferFileUtil

public final class TransferFileUtil extends Object
Shared utility class used by transfer logic.
  • Method Details

    • fetchMimeTypeFromFile

      public static String fetchMimeTypeFromFile(@NonNull File file) throws IOException
      Fetches the mime type for the given file. This is used to specify the content-type for requests and replies.
      Parameters:
      file - the file
      Returns:
      the string formatted mime type
      Throws:
      IOException - if an error occurred while reading the file