Scan and replace specific character with random position in text file in Java

I am trying to build a mini game and having problem with generating random stars in the map/maze.
I have a method that will replace existing “**” to “0” , and I want it to replace any 5 random “0” with “*” again so that every time I run the program those stars will be generated randomly, but I can’t figure out the algorithm.
For example:

before
1111111111
1000*00001
1000000*01
10*0000*01
10000*0001
1111111111

after
1111111111
100*00*001
1*00000001
100000*001
100*000001
1111111111

Methods that im using currently,

 public static void main(String[] args) {
    cheeseReset("maze.txt", "*", "0");     
}

static void cheeseReset(String filePath, String oldString, String newString)
{
    File fileToBeModified = new File(filePath);
    String oldContent = "";
    BufferedReader reader = null;
    FileWriter writer = null;

    try
    {
        reader = new BufferedReader(new FileReader(fileToBeModified));
        String line = reader.readLine();
        while (line != null) 
        {
            oldContent = oldContent + line + System.lineSeparator();
            line = reader.readLine();
        }

        String newContent = oldContent.replace(oldString, newString); 
        //replace 5 random  "0" with "*"
        writer = new FileWriter(fileToBeModified);
        writer.write(newContent);      
    }

    catch (IOException e)
    {
        e.printStackTrace();
    }
    finally
    {
        try
        {
            reader.close();
            writer.close();
        } 
        catch (IOException e) 
        {
            e.printStackTrace();
        }
    }
}