import java.util.Scanner;
import java.io.*;
public class Assignment14a
{
	public static void main (String[] args)
	{
			String filename="U:\\supplies.txt";
			File textFile= new File(filename);
			FileReader in;
			BufferedReader readFile;
			String sentence;
			if (textFile.exists())
			{
				System.out.println("File exists");
			}
			else
			{  
				try
				{
					textFile.createNewFile();
					System.out.println("New File created");
				}
				catch (IOException e)
				{
					System.out.println(" File could not be created");
					System.err.println("IOException :"+ e.getMessage());
				}				
			}

			try
			{
				in = new FileReader(textFile);
				readFile= new BufferedReader(in);
				while((sentence=readFile.readLine())!=null)
				{
					sentence=sentence.toUpperCase();
					System.out.println(sentence);
				}
			
				readFile.close();
				in.close();	
			}
			catch (FileNotFoundException e )
			{
				System.out.println(" File does not exist");
				System.err.println("FileNotFoundException :"+ e.getMessage());
			}
			catch (IOException e)
			{
				System.out.println(" Problem reading file");
				System.err.println("IOException :"+ e.getMessage());
			}
		
	}
}
