I am trying to get byte array from temp file. I know my connection works because I am getting the correct values of the map's strings. But I keep getting a null byte array. Please help! Any help is greatly appreciated!
package packagename
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import com.microsoft.azure.storage.CloudStorageAccount;
import com.microsoft.azure.storage.blob.CloudBlob;
import com.microsoft.azure.storage.blob.CloudBlobClient;
import com.microsoft.azure.storage.blob.CloudBlobContainer;
import com.microsoft.azure.storage.blob.ListBlobItem;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Hashtable;
import java.util.Map;
public class Getfilereference extends AsyncTask<Map<String,byte[]>,Void,Map<String,byte[]>> {
    public Context mContext;
    public Getfilereference(Context context) {
        mContext = context;
    }
    @Override
    protected Map<String, byte[]> doInBackground(Map<String, byte[]>... params) {
        Map<String, byte[]> dictionary = new Hashtable<>();
        try {
            final String storageConnectionString =
                    "myconnectionstring";
            final String azureblobstoragecontainername = "mycontainer";
            CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);
            CloudBlobClient blobClient = storageAccount.createCloudBlobClient();
            CloudBlobContainer container = blobClient.getContainerReference(azureblobstoragecontainername);
            for (ListBlobItem blobItem : container.listBlobs()) {
                if (blobItem instanceof CloudBlob) {
                    File file;
                    file = File.createTempFile("familyimages", null, mContext.getCacheDir());
                    CloudBlob blob = (CloudBlob) blobItem;
                    blob.download(new FileOutputStream(file + "\\" + blob.getName()));
                    FileInputStream fis = new FileInputStream(file + "\\" + blob.getName());
                    byte[] t = new byte[(file + "\\" + blob.getName()).length()];
                    fis.read(t);
                    fis.close();
                    dictionary.put(blob.getName(), t);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return dictionary;
    }
    @Override
    protected void onPostExecute(Map<String, byte[]> dictionary2) {
        DirectoryOpenHelper dbhelper = new DirectoryOpenHelper(mContext);
        for (Map.Entry<String, byte[]> entry : dictionary2.entrySet()) {
            String key = entry.getKey();
            byte[] value = entry.getValue();
            dbhelper.openDB();
            dbhelper.insertfamilyimageinrow(value, Integer.valueOf(key));
            Log.i("Info",key);
        }
    }
}