<!--
{
  "documentType" : "article",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMReadOnlyDataBlockBuffer/RandomAccessCollection-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "RandomAccessCollection Implementations"
}
-->

# RandomAccessCollection Implementations

## Topics

### Instance Properties

[`var endIndex: Int`](/documentation/CoreMedia/CMReadOnlyDataBlockBuffer/endIndex)

The position one greater than the last valid subscript argument.

[`var indices: Range<Int>`](/documentation/CoreMedia/CMReadOnlyDataBlockBuffer/indices)

The indices that are valid for subscripting the collection, in ascending order.

[`var startIndex: Int`](/documentation/CoreMedia/CMReadOnlyDataBlockBuffer/startIndex)

The position of the first element.

### Subscripts

[`subscript(Range<CMReadOnlyDataBlockBuffer.Index>) -> CMReadOnlyDataBlockBuffer`](/documentation/CoreMedia/CMReadOnlyDataBlockBuffer/subscript(_:)-759gz)

Creates a new block buffer that references a subrange of this block buffer.

[`subscript(CMReadOnlyDataBlockBuffer.Index) -> UInt8`](/documentation/CoreMedia/CMReadOnlyDataBlockBuffer/subscript(_:)-8htjr)

Accesses the data byte at the specified position.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)