Hirdetés
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Projektor topic
- AMD Navi Radeon™ RX 6xxx sorozat
- ThinkPad (NEM IdeaPad)
- Hivatalosan is elkezd védekezni az Intel csodafegyvere ellen az új Geekbench
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Apple MacBook
- AMD Navi Radeon™ RX 9xxx sorozat
- Többszörösére növeli az üzemidőt az LG 1 Hz-es LCD panelje
- Kormányok / autós szimulátorok topikja
Ú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?:))
- Hálózati / IP kamera
- Óra topik
- Építő/felújító topik
- Szoszo94: Xiaomi Mi Router 3G - Padavanra fel!
- 50 év után kilőtt négy űrhajós a Holdra
- Lalikiraly: Commodore The C64, Ultimate
- Kerékpárosok, bringások ide!
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- Anime filmek és sorozatok
- Székesfehérvár és környéke adok-veszek-beszélgetek
- További aktív témák...
- Dell Latitude 5520,15.6",FHD, i5-1145G7,16GB DDR4,256GB,WIN11
- LENOVO X380 Yoga 360 touch - 13,3" FHD - i5 8250U, 8GB RAM, SSD, jó akku, - számla, 6 hó gar
- Apple iPhone 17 Pro Max 256GB Cosmic Orange használt, karcmentes 100% akku Apple garancia 2026
- 27% - ASUS ROG Strix XG27ACS Monitor! 2560x1440 / 1ms / 180Hz / G-Sync / FreeSync
- Honor 200 Pro 512GB,Újszerű,Dobozaval,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

