<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZVirtioQueueElement/peekIntoReadBuffers(withExactLength:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZVirtioQueueElement(im)peekIntoReadBuffersWithExactLength:error:"
  },
  "title" : "peekIntoReadBuffers(withExactLength:)"
}
-->

# peekIntoReadBuffers(withExactLength:)

Peeks into the read buffers and copy exactLength bytes from the read buffer into the data object it returns.

```
func peekIntoReadBuffers(withExactLength exactLength: Int) throws -> Data
```

## Parameters

`exactLength`

Number of bytes to copy from the read buffers.

## Return Value

An <doc://com.apple.documentation/documentation/Foundation/NSData> object filled with the memory that the framework copied, or `nil` if the peek failed.

## Discussion

This method allows you to peek into the read buffers without consuming any of the memory, [`readBuffersAvailableByteCount`](/documentation/Virtualization/VZVirtioQueueElement/readBuffersAvailableByteCount)
does not change after this call.

---

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)