Well the next step for you, would be to make sure the file you just tried to open for reading/writing (that's what the "rw" option means, if you give it just a r or just a w, it's for only reading, or only writing, respectively), is actually open/available. You can do this by simply running a check to see if your 'file' variable is null. Ok great! now you need to actually start writing some information into the file. This can take MANY forms, I recommend checking out the RandomaccessFile api to see exactly what methods are available, and what form you data has to be in to write it.
It'll look something like:
if (file != null){
file.write(myByteArray[]);
}
now, you may have your data structured however, but that's the general gist of it.
Good luck!