# SegmentBuilder.ReadNextBytes(ArraySegment&lt;byte&gt;, int)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.segmentbuilder/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.segmentbuilder/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SegmentBuilder.cs#L79-L87)

```csharp
public static ArraySegment<byte> ReadNextBytes(ArraySegment<byte> segment, ref int readerOffset)
```

Reads the next item in the segment as a byte array. For performance, this is returned as a sub-segment of the original segment.

### Parameters

- `segment` (`ArraySegment<byte>`)
- `readerOffset` (`int`)
