Ejemplo n.º 1
0
 public bool Identify(System.IO.Stream stream)
 {
     using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true))
     {
         return(reader.CheckSignature(4, "CSTM"));
     }
 }
Ejemplo n.º 2
0
 public bool Identify(System.IO.Stream stream)
 {
     using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true))
     {
         reader.SetByteOrder(true);
         return(reader.ReadInt32() == MagicFileConstant);
     }
 }
Ejemplo n.º 3
0
 public bool Identify(System.IO.Stream stream)
 {
     using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true))
     {
         if (reader.CheckSignature(2, "BY") || reader.CheckSignature(2, "YB"))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }
Ejemplo n.º 4
0
        public bool Identify(System.IO.Stream stream)
        {
            using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true))
            {
                bool IsValidSig = reader.CheckSignature(3, "ID3");
                bool IsValidExt = Utils.HasExtension(FileName, ".mp3");

                if (IsValidExt || IsValidSig)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
Ejemplo n.º 5
0
        public bool Identify(System.IO.Stream stream)
        {
            using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true))
            {
                bool IsValidSig = reader.CheckSignature(4, "WAVE"); //RIFF is also used in avi so just use WAVE
                bool IsValidExt = reader.CheckSignature(4, ".wav");

                if (IsValidExt || IsValidSig)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }