Friends

I have to use BOM ( Byte Order Mark ) to make sure that downloaded files in cvs and excel in UTF-8 formats are displayed properly.

\*\*

> 
> My question is can BOM be applied to FileOutputStream instead of
>  OutputStream as below ?
> 
> 
> 

\*\* 

```
    String targetfileName = reportXMLFileName.substring(0, reportXMLFileName.lastIndexOf(".") + 1);
      targetfileName += "xlsx";
     File tmpFile=new File((filePath !=null?filePath.trim():"")+"/"+templateFile);
     FileOutputStream out = new FileOutputStream((filePath !=null?filePath.trim():"")+"/"+targetfileName);

/* Here is the example*/
  out.write(new byte[] {(byte)0xEF, (byte)0xBB, (byte)0xBF });
  substitute(tmpFile, tmp, sheetRef.substring(1), out);
                    out.close();

```