Results 1 to 9 of 9
Thread: Input./Output -
Hybrid View
-
6th December 2008 10:49 #1
Input./Output -
, .Write a program that splits given file into parts (1.44MB for example). The output files should be automatically numbered
-
6th December 2008 11:14 #2
-
6th December 2008 11:23 #3Registered User
Join Date: Dec:2008
Location: Karlsruhe
Posts: 13
-
6th December 2008 11:49 #4
?
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
6th December 2008 12:09 #5
-
6th December 2008 12:24 #6Code:
_ == _ __() __() _ = 0
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
6th December 2008 12:34 #7
:
, @icaci .Code:import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class Problem5 { /** * @param args */ public static void main(String[] args)throws FileNotFoundException { // TODO Auto-generated method stub FileInputStream fileinput = null; FileOutputStream fileoutput = null; int counter=0; try { fileinput = new FileInputStream("WindowsUpdate.log"); fileoutput = new FileOutputStream("resultat"+counter+".txt"); int text; while((text=fileinput.read()) != - 1) { // , . // , - 1.44 MB , .} } catch(IOException e) { System.out.println(e.getMessage()); } finally { if(fileinput != null && fileoutput != null) { try { fileinput.close(); } catch (IOException e) { e.printStackTrace(); } } } } }_ == _ __() __() _ = 0
, - 1.44 MB , .
-
6th December 2008 15:53 #8
-
6th December 2008 19:40 #9
Join Date: Sep:2005
Location: Sofia
Posts: 18,517
1.44 int read(byte[], int, int), . . , - - . , 5 .
.




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in