Új hozzászólás Aktív témák
-
Drizzt
nagyúr
válasz
btraven
#11666
üzenetére
Koszi a peldat!
Igy egyszerubb valaszolni a kerdesedre.
[Javadoc] : "Exceptions are thrown for problems with the OutputStream and for classes that should not be serialized. All exceptions are fatal to the OutputStream, which is left in an indeterminate state, and it is up to the caller to ignore or recover the stream state."
Szoval nincsen kulonosebben specifikalva, hogy mi fog tortenni Exception eseten. Elofordulhat, hogy kulonbozo JVM-eken es kulonbozo javaverziokon is kulonbozokeppen viselkedik, de a leirasaban benne van, hogy az esetleges szemetet a hivonak kell feltakaritani. Szamomra meglepo, hogy igy van. Szoval a catch agban zard a Streameket, majd torold a fajlt, ha van.
Ha atirod a peldadat "try with resources" alapon, akkor a close-et nem kell sehol meghivnod, mert a ket outputstream autoClosable.
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Apple iPhone 12 128GB,Újszerű,Adatkabel,12 hónap garanciával
- Lenovo L13 Core I3-10110U / 4GB DDR4 / LAPTOP 1
- Apple iPhone 12 Mini 128GB, Kártyafüggetlen, 1 Év Garanciával
- Egyedi névre szóló karácsonyfadísz rendelhető! 3D Nyomtatott!
- BESZÁMÍTÁS! MSI B450M R5 5500 16GB DDR4 512GB SSD RX 6600XT 8GB DeepCool CC560 Thermaltake 730W
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest

