well, your method of hiding the files is not completely secure. There are sqlite admin apps that can open up the SQLite database and view all entries, no matter what file extension you give it. They could open the database, decode the Base64 code and create an image from that. So your method is security through obscurity and will not protect your images 100% though I think it will be good enough for 99% of people.
Download the Base64 class here
and put it with the rest of your class files.
I have never used the urlStream class so, I hope you know what you are doing there.
Anyways, read the streamed data into a ByteArray and then encode to Base64 using the Base64.encodeByteArray() method.
var ba:ByteArray = new ByteArray();
//read the urlStream data into the byteArray. leaving that part out here
var base64String:String = Base64.encodeByteArray(ba);
//insert base64String into the database
then put this in an sqlite database. i hope you know how to do this part, if not i can help you with that as well.
to retrieve the stored data you would load the data from the sqlite database and decode the string into a bytearray.