> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class WrapperStream

Namespace: [VM.Managed](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed)\
Assembly: VMAppCore.dll

This class is to represent the wrapper stream.

```csharp theme={null}
public class WrapperStream : Stream
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[MarshalByRefObject](https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject) ←
[Stream](https://learn.microsoft.com/dotnet/api/system.io.stream) ←
[WrapperStream](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.WrapperStream.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### WrapperStream(string, FileMode, string)

Initializes a new instance of the [WrapperStream](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Managed.WrapperStream.md) class.

```csharp theme={null}
public WrapperStream(string strFileName, FileMode mode, string comment)
```

#### Parameters

`strFileName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the string file.

`mode` [FileMode](https://learn.microsoft.com/dotnet/api/system.io.filemode)

The mode.

`comment` [string](https://learn.microsoft.com/dotnet/api/system.string)

The comment.

## Properties

### CanRead

Gets or sets the readable state.

```csharp theme={null}
public override bool CanRead { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### CanSeek

Gets or sets the seekable state.

```csharp theme={null}
public override bool CanSeek { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### CanWrite

Gets or sets the writable state.

```csharp theme={null}
public override bool CanWrite { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Comment

Gets the comment.

```csharp theme={null}
public string Comment { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Length

Gets the length.

```csharp theme={null}
public override long Length { get; }
```

#### Property Value

[long](https://learn.microsoft.com/dotnet/api/system.int64)

### PointerSize

Gets the size of pointer.

```csharp theme={null}
public long PointerSize { get; }
```

#### Property Value

[long](https://learn.microsoft.com/dotnet/api/system.int64)

### Position

Gets or sets the position.

```csharp theme={null}
public override long Position { get; set; }
```

#### Property Value

[long](https://learn.microsoft.com/dotnet/api/system.int64)

## Methods

### Close()

Close view.

```csharp theme={null}
public override void Close()
```

### Flush()

Flushes this instance.

```csharp theme={null}
public override void Flush()
```

### Read(byte\[], int, int)

Reads the specified buffer.

```csharp theme={null}
public override int Read(byte[] buffer, int offset, int count)
```

#### Parameters

`buffer` [byte](https://learn.microsoft.com/dotnet/api/system.byte)\[]

The buffer.

`offset` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The offset.

`count` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The count.

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### Seek(long, SeekOrigin)

Seeks the specified offset.

```csharp theme={null}
public override long Seek(long offset, SeekOrigin origin)
```

#### Parameters

`offset` [long](https://learn.microsoft.com/dotnet/api/system.int64)

The offset.

`origin` [SeekOrigin](https://learn.microsoft.com/dotnet/api/system.io.seekorigin)

The origin.

#### Returns

[long](https://learn.microsoft.com/dotnet/api/system.int64)

### SetLength(long)

Sets the length.

```csharp theme={null}
public override void SetLength(long len)
```

#### Parameters

`len` [long](https://learn.microsoft.com/dotnet/api/system.int64)

The length.

### Write(byte\[], int, int)

Writes the specified buffer.

```csharp theme={null}
public override void Write(byte[] buffer, int offset, int count)
```

#### Parameters

`buffer` [byte](https://learn.microsoft.com/dotnet/api/system.byte)\[]

The buffer.

`offset` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The offset.

`count` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The count.
