Hi Friends,
i m checking option to lock a stream/string in Java for a certain time so is there any possibilities?
By locking i mean, it should not be overwritten, or accessed by sum other variable ....
please suggest me your ideas.
Thanks,
Paul
Hi Friends,
i m checking option to lock a stream/string in Java for a certain time so is there any possibilities?
By locking i mean, it should not be overwritten, or accessed by sum other variable ....
please suggest me your ideas.
Thanks,
Paul
What kind of lock you need. Lock on a file or locking not to be changed by the threads in the same process?
For locking the stream inside the process you might take a look in the java docs. For some classes you can pass a lock object which is used for synchronization.
If you want to lock a file You can check the javadocs as well.
Check the Java Apis and it will help you so much.
I use to read it and really, it makes my code easier and fast!
__________
Sofi Hedz
Grupo Mayan Friends
I think I read the answer of this question in jott book.In that book an easy way to lock this.first I will read again.May be next time I will give the answer.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks