---
title: "Class StreamExtensionMethods | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.ExtensionMethods/StreamExtensionMethods/"
---

# Class StreamExtensionMethods

> **Inheritance:** `System.Object` -> StreamExtensionMethods

###### **Namespace**: [Aurigma.DesignAtoms.ExtensionMethods](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.ExtensionMethods.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public static class StreamExtensionMethods
```

## Inherited Members

* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Methods

### ToBase64

```csharp
public static string ToBase64(this Stream source)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *source* |  |

##### Returns

`System.String`

### EnsureStreamIsSeekable

```csharp
public static Stream EnsureStreamIsSeekable(this Stream source)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *source* |  |

##### Returns

`System.IO.Stream`

### EnsureStreamAtZeroPosition

```csharp
public static Stream EnsureStreamAtZeroPosition(this Stream stream)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *stream* |  |

##### Returns

`System.IO.Stream`
