Reading A CSV file from Aerospike



I had uploaded a .csv format file into Aerospike after converting it to a byte[] array, using java client, using the following code:

            byte[] bFile = readBytesFromFile(filePath); //this function returns the converted byte[].

            fileName = filePath.substring(filePath.lastIndexOf("/")+1);//get filename.csv
            fileName = fileName.substring(0,fileName.lastIndexOf('.'));//remove extension

            key = new Key("test","test-set","key-name");

            bin = new Bin(fileName,bFile); //Name of bin the name of file

            aerospikeClient.put(new WritePolicy(),key,bin);

I was successful in uploading the data. Although I’m not sure. How do i retrieve the file back now ? Any help would be great. Thank you.