while (tokenizer.hasMoreTokens())
{
String token = tokenizer.nextToken();
// Characters written to it are translated into bytes array
// according to a specified character encoding.
dataByte = charConverter.stringToByteArray(token);
// Save byteArray into Record based on the file format
Record record = format.getNewRecord(dataByte);
// write Record into file
file.write(record);
}