Returns whether this reader can handle the specified file (stream).
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Type: System.IO.Stream
Stream value that specifies a stream for which the format needs to be checked.protected override bool IsSupported(System.IO.Stream stream) { bool result = false; try { byte[] header = new byte[headerLength]; stream.Seek(0, System.IO.SeekOrigin.Begin); stream.Read(header, 0, headerLength); //Check the header using a custom helper method //NOTE: this method is not a part of the CustomFormatReader class, and you //have to add it yourself result = IsHeaderCorrect(header); } finally { stream.Seek(0, System.IO.SeekOrigin.Begin); } return result; }