- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
private void CopyFiles(String dirName) {
InputStream is = this.getClass().getResourceAsStream(
"/18.xslt");
OutputStream os;
try {
os = new FileOutputStream(dirName + "/18.xslt");
byte[] buffer = new byte[4096];
int length;
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
os.close();
is.close();
is = this.getClass().getResourceAsStream(
"/13_02.tif");
os = new FileOutputStream(dirName + "/13_02.tif");
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
os.close();
is.close();
is = this.getClass().getResourceAsStream("/13_02.xslt");
os = new FileOutputStream(dirName + "/13_02.xslt");
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
os.close();
is.close();
is = this.getClass().getResourceAsStream(
"/13_02_t.tif");
os = new FileOutputStream(dirName + "/13_02_t.tif");
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
os.close();
is.close();
is = this.getClass().getResourceAsStream(
"/13_02_t.xslt");
os = new FileOutputStream(dirName + "/13_02_t.xslt");
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
os.close();
is.close();
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
3Doomer 03.04.2014 15:53 # +1
Правда, стоило бы цикл сделать пофайловый, а не писать для каждого файла отдельно открытие/закрытие/итд...
evg_ever 03.04.2014 16:45 # 0
roman-kashitsyn 03.04.2014 16:13 # 0
evg_ever 03.04.2014 16:46 # 0
bormand 04.04.2014 09:40 # 0
evg_ever 04.04.2014 09:52 # 0
bormand 04.04.2014 10:04 # 0
Lure Of Chaos 03.04.2014 18:16 # 0
evg_ever 03.04.2014 21:29 # 0
Lure Of Chaos 04.04.2014 07:34 # 0
bormand 04.04.2014 08:42 # 0
Lure Of Chaos 04.04.2014 08:45 # 0
bormand 04.04.2014 08:54 # 0
Lure Of Chaos 04.04.2014 08:56 # +1
roman-kashitsyn 04.04.2014 10:12 # +1
evg_ever 04.04.2014 10:47 # +1