Reading single InputStream from multiple methods

后端 未结 3 542
轮回少年
轮回少年 2021-01-26 18:21

I have initialized an InputStream in a single method in a class and passing it to next method for processing. The InputStream essentially encapsulates CSV file for processing.

3条回答
  •  花落未央
    2021-01-26 18:47

    You're not doing anything wrong. Just make sure that the method opening a stream/reader also closes it, in a finally block.

提交回复
热议问题