Question: If I want to move a rectangle in a Canvas, would I have to modify the Top and Left properties? Thats the only way I see it would be possible. I am making a tile-based game, and the rectangles I want to move are filled with images of enemies and my hero.

Answer: 
You can't directly convert it to string. You should implement something like this
Add this code to your method

```
    //Commented this out because this is not the efficient way to achieve that
    //StringBuilder builder = new StringBuilder();
    //int ch;
    //while((ch = fis.read()) != -1){
    //  builder.append((char)ch);
    //}
    //          
    //System.out.println(builder.toString());

```

Use Aubin's solution:

```
public static String getFileContent(
   FileInputStream fis,
   String          encoding ) throws IOException
 {
   try( BufferedReader br =
           new BufferedReader( new InputStreamReader(fis, encoding )))
   {
      StringBuilder sb = new StringBuilder();
      String line;
      while(( line = br.readLine()) != null ) {
         sb.append( line );
         sb.append( '\n' );
      }
      return sb.toString();
   }
}

```
Use following code ---->

```
try {
    FileInputStream fis=new FileInputStream("filename.txt");
    int i=0;    
    while((i = fis.read()) !=-1 ) {  // to reach until the laste bytecode -1
        System.out.print((char)i);   /* For converting each bytecode into character */ 
    }
    fis.close();
} catch(Exception ex) {
    System.out.println(ex); 
}

```