# JournalBufferWriter Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalbufferwriter/)

## CreateJournalStreamWriter(JournalStreamId) {#createjournalstreamwriter-orleans-journaling-journalstreamid-d8e83036}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalbufferwriter/methods/createjournalstreamwriter-orleans-journaling-journalstreamid-d8e83036/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalBufferWriter.cs#L35)

```csharp
public JournalStreamWriter CreateJournalStreamWriter(JournalStreamId streamId)
```

Creates a writer for entries belonging to `streamId`.

### Parameters

- `streamId` (`JournalStreamId`): The durable state id.

### Returns

A journal stream writer for the specified state.

## Dispose {#dispose-28fa9508}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalbufferwriter/methods/dispose-28fa9508/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalBufferWriter.cs#L69-L80)

```csharp
public void Dispose()
```

Releases resources used by this writer.

## GetBuffer {#getbuffer-95f722b3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalbufferwriter/methods/getbuffer-95f722b3/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalBufferWriter.cs#L48)

```csharp
public ArcBuffer GetBuffer()
```

Gets a pinned snapshot of the accumulated journal bytes which are safe to persist.

### Returns

An [ArcBuffer](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbuffer/) containing the accumulated journal bytes. The caller owns and must dispose the returned buffer.

## Reset {#reset-0c0aff32}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.journalbufferwriter/methods/reset-0c0aff32/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalBufferWriter.cs#L55-L63)

```csharp
public void Reset()
```

Clears all buffered data so the writer can be reused for another batch.
