コード例 #1
0
ファイル: MonoGameAssets.cs プロジェクト: zhangxin8105/LGame
 public override sbyte[] GetBytesSync(string path)
 {
     try
     {
         return(OpenFileResourceBytes(path));
     }
     catch (System.Exception ex)
     {
         LSystem.E("file :" + path + " exception:" + ex.Message);
     }
     return(null);
 }
コード例 #2
0
 public override sbyte[] GetBytesSync(string path)
 {
     try
     {
         return(ToByteArray(OpenStream(path)));
     }
     catch (System.Exception ex)
     {
         LSystem.E("file :" + path + " exception:" + ex.Message);
     }
     return(null);
 }
コード例 #3
0
ファイル: MonoGameAssets.cs プロジェクト: zhangxin8105/LGame
 public override string GetTextSync(string path)
 {
     System.Text.StringBuilder sbr = new System.Text.StringBuilder(1024);
     try
     {
         StreamReader reader = new StreamReader(OpenStream(path), JavaSystem.GetEncoding(LSystem.ENCODING));
         string       record = null;
         for (; (record = reader.ReadLine()) != null;)
         {
             sbr.Append(record);
         }
         reader.Close();
     }
     catch (System.Exception ex)
     {
         LSystem.E("file :" + path + " exception:" + ex.Message);
     }
     return(sbr.ToString());
 }