I want to put a Lock around java.io.InputStream Object and lock this stream. And when I am done finished reading I want to release the lock. How can I achieve this?
I want to put a Lock around java.io.InputStream Object and lock this stream. And
Share
Do you mean?
Its usually a good idea to use one thread to read or write to a stream, otherwise you are likely to get some confusing and random bugs. 😉
If you want to use a Lock as well