void writeDataToFileLocked(RandomAccessFile file,boolean addMayo,boolean addTomato,int whichFilling) throws IOException {
  file.setLength(0L);
  file.writeInt(whichFilling);
  file.writeBoolean(addMayo);
  file.writeBoolean(addTomato);
  Log.v(TAG,"NEW STATE: mayo=" + addMayo + " tomato="+ addTomato+ " filling="+ whichFilling);
}

void writeDataToFileLocked ( RandomAccessFile file , boolean addMayo , boolean addTomato , int whichFilling ) throws IOException { file . setLength ( 0L ) ; file . writeInt ( whichFilling ) ; file . writeBoolean ( addMayo ) ; file . writeBoolean ( addTomato ) ; Log . v ( TAG , "NEW STATE: mayo=" + addMayo + " tomato=" + addTomato + " filling=" + whichFilling ) ; }
handy helper routine to write the ui data to a file .
