Answer the question
In order to leave comments, you need to log in
How to clear an InputStream ?
Help people. The fact is that in my loop, every 3 minutes, InputStream.read() checks the incoming data and writes them to the database, how do I clear the stream after each reading so as not to write the same thing to the database?
Answer the question
In order to leave comments, you need to log in
Clear stream?
What would that mean?
Can I ask you in more detail what kind of stream are you using?
For it is impossible to simply take and "clean" any InputStream.
And yes, are you sure that you need to "clean" the stream?
Perhaps you just need to change your approach to reading from the stream?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question