All pastes #248192 Raw Edit

Anonymous

public text v1 · immutable
#248192 ·published 2006-11-14 10:40 UTC
rendered paste body
 try
			{
                                // Open the file that is the first 
                                // command line parameter
                                FileInputStream fstream = new 
					FileInputStream(file);

                                // Convert our input stream to a
                                // DataInputStream
				DataInputStream in = 
                                        new DataInputStream(fstream);

                                // Continue to read lines while 
                                // there are still some left to read
                                while (in.available() !=0)
				{
                                        // Print file line to screen
					text.setText(text.getText()+in.readLine());
				}

				in.close();
			} 
                        catch (Exception e2)
			{
				System.err.println("File input error");
			}