---
title: dataWrittenToMemoryStreamKey
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/stream/propertykey/datawrittentomemorystreamkey
---

# dataWrittenToMemoryStreamKey

Value is an NSData instance containing the data written to a memory stream.

## Declaration

```swift
static let dataWrittenToMemoryStreamKey: Stream.PropertyKey
```

## Discussion

Discussion Use this property when you have an output-stream object instantiated to collect written data in memory. The value of this property is read-only.

## See Also

### Type Properties

- [fileCurrentOffsetKey](foundation/stream/propertykey/filecurrentoffsetkey.md)
- [networkServiceType](foundation/stream/propertykey/networkservicetype.md)
- [socketSecurityLevelKey](foundation/stream/propertykey/socketsecuritylevelkey.md)
- [socksProxyConfigurationKey](foundation/stream/propertykey/socksproxyconfigurationkey.md)
