Hirdetés
- ldave: New Game Blitz - 2025
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sh4d0w: Én és a számítógép
- Brogyi: CTEK akkumulátor töltő és másolatai
- sziku69: Fűzzük össze a szavakat :)
- ricshard444: iPhone 17 Pro Max - Kedves téglám
- Luck Dragon: Asszociációs játék. :)
- sziku69: Szólánc.
- btz: Internet fejlesztés országosan!
- lezso6: Miért is jó, ha dohányzol?! Megéri rászokni!
Új hozzászólás Aktív témák
-
n00n
őstag
A legegyszerűbb, ha ideírom a forráskódot:
class Copy extends SwingWorker<Void, Void> {
private File selectedfile = new File("D:/Adatok/proba.file");
private File chosenDestination = new File("D:/Adatok/ide/proba.file");
@Override
protected Void doInBackground() throws Exception {
try {
FileInputStream fileInputStream = new FileInputStream(
selectedfile);
BufferedInputStream bufferedInputStream = new BufferedInputStream(
fileInputStream);
ProgressMonitorInputStream progressMonitorInputStream;
UIManager.put("ProgressMonitor.progressText", "Mentés másolása");
UIManager.put("OptionPane.cancelButtonText", "Mégse");
progressMonitorInputStream = new ProgressMonitorInputStream(MentesPanel.this, "Fájl másolása folyamatban", bufferedInputStream);
File outputFile = new File("" + chosenDestination);
FileOutputStream fileOutputStream = new FileOutputStream(
outputFile);
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(
fileOutputStream);
int data;
byte[] buffer = new byte[1024];
while ((data = progressMonitorInputStream.read(buffer)) > 0) {
bufferedOutputStream.write(buffer);
}
bufferedOutputStream.close();
progressMonitorInputStream.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
@Override
public void done() {
JOptionPane.showMessageDialog(MentesPanel.this, "A mentés másolása befejeződött!", "Kész", 1);
}
}
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Asztali PC , R7 5700X , RTX 3070 Ti , 32GB RAM , 512GB NVME , 2TB HDD
- Asztali PC , R7 8700F , RTX 3070 Ti , 32GB DDR5 , 512GB NVME , 1TB HDD
- Asztali PC , i7 10700 , RX 5700 XT , 16GB DDR4 , 512GB NVME , 500 GB HDD
- Csere-Beszámítás! Xbox Series X 1TB Játékkonzol! Ajándék Akkumulátoros töltőállomással!
- Iphone 15 Pro 128GB Blue 2év garancia! 97% akku.
- Telefon felvásárlás!! iPhone 11/iPhone 11 Pro/iPhone 11 Pro Max
- Eladó karcmentes Apple iPhone 13 128GB / 12 hó jótállás
- billentyűzetek - kiárusítás - Logitech, Corsair, ASUS
- Apple iPhone 15 Pro 128GB, Kártyafüggetlen, 1 Év Garanciával
- LG 34GN850P-B - 34" Ívelt Nano IPS - 3440x1440 - 160Hz 1ms - G-Sync - FreeSync - HDR 400
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest