1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
SAS.FileService sasFileService = ws.FileService ;
SAS.Fileref sasFileref;
Fileref sasFileref = this.ws.FileService.UseFileref("tmp1") ;// temp1 fait réference à un fichier html sur le serveur SAS
SCRIPTOLib.StreamHelper sasStreamHelper = new SCRIPTOLib.StreamHelper();
SAS.BinaryStream sasBinaryStream;
sasBinaryStream = sasFileref.OpenBinaryStream(SAS.StreamOpenMode.StreamOpenModeForReading);
byte[] pieChart = (byte[])sasStreamHelper.ReadBinaryArray(
sasBinaryStream, 0);
sasBinaryStream.Close();
string strPieChart = System.Text.Encoding.UTF8.GetString(pieChart);
System.IO.FileStream fs = new FileStream("c:\\pieChart.html", FileMode.Create, FileAccess.Write);
fs.Write(pieChart, 0, pieChart.Length);
fs.Close(); |
Partager