public bool Identify(System.IO.Stream stream) { using (var reader = new Switch_Toolbox.Library.IO.FileReader(stream, true)) { return(reader.CheckSignature(4, "CSTM")); } }
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); } }
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); } } }
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); } } }
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); } } }