jeudi 1 janvier 2015

Attempting Read&Write simultaneously? topic

11:09






I'm creating an app that has backround services/broadcast recievers... a lot of seperate threads are running.

What would happen if one thread is writing to file.txt with an FileOutputStream object, and another thread then attempts to write to the same file.txt with another FileOutputStream object?

Would the second thread wait until the first one is finished? Or do I need to implement FileLock in my android app?

Also what happens if I try to read with FileInputStream while another thread is writing to that file with FileOutputStream?

Thanks!

-Brian






Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 commentaires:

Enregistrer un commentaire

 

© 2013 Mobile Probleme. All rights resevered. Designed by Templateism

Back To Top