{
// open original file for each resolution.
mOriginFile.open(AS400File.READ_WRITE, 0,
AS400File.COMMIT_LOCK_LEVEL_DEFAULT);
CharConverter charConverter = new CharConverter(mEncoding);
StringTokenizer tokenizer = new StringTokenizer(callData,
Constants.LINE_SEPERATOR);
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);
}