|
|
|
Нужно ли закрывать оба потока?
|
|||
|---|---|---|---|
|
#18+
При работе с классом DataInputStream, его приходится открывать на базе FileInputStream. Вопрос: Нужно ли закрывать оба потока или достаточно только закрыть DataInputStream? import java.io.*; public class readfile { public static void main(String args[]) { String str = null; FileInputStream f = new FileInputStream("test.txt"); DataInputStream d = new DataInputStream(f); ... d.close(); f.close(); } } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.06.2004, 16:33 |
|
||
|
Нужно ли закрывать оба потока?
|
|||
|---|---|---|---|
|
#18+
Закрывай все. _______________ Alex There are three kinds of people: those who can count and those who can't ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.06.2004, 16:48 |
|
||
|
Нужно ли закрывать оба потока?
|
|||
|---|---|---|---|
|
#18+
Ты уверен или просто так полагаешь?!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 18.06.2004, 20:15 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=32567813&tid=2154021]: |
0ms |
get settings: |
7ms |
get forum list: |
18ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
64ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
40ms |
get tp. blocked users: |
1ms |
| others: | 200ms |
| total: | 352ms |

| 0 / 0 |
