MCPcopy Create free account
hub / github.com/apache/arrow / DoPeek

Method DoPeek

cpp/src/arrow/io/memory.cc:287–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287Result<std::string_view> BufferReader::DoPeek(int64_t nbytes) {
288 RETURN_NOT_OK(CheckClosed());
289
290 const int64_t bytes_available = std::min(nbytes, size_ - position_);
291 return std::string_view(reinterpret_cast<const char*>(data_) + position_,
292 static_cast<size_t>(bytes_available));
293}
294
295bool BufferReader::supports_zero_copy() const { return true; }
296

Callers

nothing calls this directly

Calls 1

CheckClosedFunction · 0.70

Tested by

no test coverage detected