You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remember: The returned DirectoryStream is a stream. If you are not using a try-with-resources statement, do not forget to close the stream in the finally block. The try-with-resources statement takes care of this for you. You can learn more about stream in the Stream section.
What does "...is a stream" mean? A java.util.stream.Stream? A java.io.InputStream or java.io.OutputStream? It is neither. Maybe the author meant "...is an AutoCloseable"?
The text was updated successfully, but these errors were encountered:
In https://dev.java/learn/java-io/file-system/listing/, it says:
Remember: The returned DirectoryStream is a stream. If you are not using a try-with-resources statement, do not forget to close the stream in the finally block. The try-with-resources statement takes care of this for you. You can learn more about stream in the Stream section.
What does "...is a stream" mean? A
java.util.stream.Stream
? Ajava.io.InputStream
orjava.io.OutputStream
? It is neither. Maybe the author meant "...is anAutoCloseable
"?The text was updated successfully, but these errors were encountered: