---
title: "CustomFormatReader..::.IsSupported Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Codecs_CustomFormatReader_IsSupported_1_bca7c9fe.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# CustomFormatReader.IsSupported Method 
 
Returns whether this reader can handle the specified file (stream).
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Protected Friend MustOverride Function IsSupported ( _stream As Stream _
) As Boolean
```
 
```csharp
protected internal abstract bool IsSupported(Stream stream
)
```
 
### Parameters
 
 - stream
     - Type: [System.IO.Stream](http://msdn2.microsoft.com/en-us/8f86tw9e)
 [Stream](http://msdn2.microsoft.com/en-us/8f86tw9e) value that specifies a stream for which the format needs to be checked.
 
### Return Value
Value that is equal to **true** when the file format is supported, or **false** otherwise.
 
## Examples
  
```csharp
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;
}
```
   
## See Also

### Reference

- [CustomFormatReader Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Codecs_CustomFormatReader.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Codecs.htm.md)
