1. FindBugs: "may fail to close stream" - is this valid in case of InputStream? stackoverflow.comIn my Java code, I start a new process, then obtain its input stream to read it:
FindBugs reports an error here:
|
2. Closing Java InputStreams stackoverflow.comGood afternoon all. I have some questions about the usage of the close() method when using Java InputStreams. From what I see and read from most developers, you should always explicitly ... |
3. closing nested streams stackoverflow.comPossible Duplicate:How we close nested streams? Closing all of them? If yes what is the order?
|
4. Properly closing Java Process InputStream from getInputStream stackoverflow.comI could not find clarification of this in the documentation. But when we have a Process object and call getInputStream(), do we get a new stream that we should explicitly close when we ... |
5. What happens if you dont close a InputStream coderanch.comI was going through some code that I will have to maintain in the future when I came across this piece of code //load config file InputStream s = new FileInputStream(fileName); Properties properties = new Properties(); properties.load(s); But the input stream s is never closed. This is a standalone Java programs and there are several such programs where the InputStream is ... |
6. InputStream.close() vs garbage collection coderanch.comGarbage collection will only free the resources within the JVM. The resources assigned to the VM by the operating system will still be reserved. I've seen several poorly written applications run out of resources due to poorly handled database connections, sockets and files. Rule of thumb: if it has a close() method, invoke it when you are done with it. And ... |
7. How to read closed inputStream coderanch.comOriginally posted by Rohit Kumar: How to read closed inputStream? I just want to see the content of the input stream before the input stream processes, so even if any way to write the input stream to file before sent for process it. Thanks I think the description of your problem actually contradicts the subject. You basically want to ... |
8. what operation does inputStream.close() does? coderanch.comHi all, Recently I was coding for streaming a file from a location .I stored the stream as byte array to pass it to the calling method. But I later found tht, even if you pass the stream as such, it works well though u close your stream in the called method. Does nt closing the stream closes the data? what ... |
9. finally and InputStream.close() method forums.oracle.comHello, I'm reading "effective Java" by Bloch and on page 29 (avoid finalizers), if I understand fine, he says "don't put InputStream.close() inside a finally { }"; I'm not sure to have understood it right; in fact, I read many internet pages that suggest to do it! Does anyone with the book explain to me where is the point? thanks |
10. Closing InputStream after sound file plays? forums.oracle.com |
11. Input stream closing during file transmission forums.oracle.com |
12. why not make InputStream "close()" abstract? forums.oracle.comI am reading the API for java.io.InputStream. I noticed: (1) java.io.InputStream is abstract. (2) the "close()" method is documented as doing nothing. Were I to have designed InputStream, I would have made "close()" abstract. Is there anything to be learned regarding why the API designers implemented a method that does nothing in an already abstract class? I notice the "Closeable" interface, ... |