---
title: "CFReadStreamHasBytesAvailable(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfreadstreamhasbytesavailable(_:)"
---

# CFReadStreamHasBytesAvailable(_:)

Returns a Boolean value that indicates whether a readable stream has data that can be read without blocking.

## Declaration

```swift
func CFReadStreamHasBytesAvailable(_ stream: CFReadStream!) -> Bool
```

## Parameters

- `stream`: The stream to examine.

## Return Value

Return Value TRUE if data can be read from stream without blocking, otherwise FALSE. If stream cannot tell if data is available without actually trying to read the data, this function returns TRUE.

## See Also

### Examining Stream Properties

- [CFReadStreamCopyProperty(_:_:)](corefoundation/cfreadstreamcopyproperty(_:_:).md)
- [CFReadStreamGetBuffer(_:_:_:)](corefoundation/cfreadstreamgetbuffer(_:_:_:).md)
- [CFReadStreamCopyError(_:)](corefoundation/cfreadstreamcopyerror(_:).md)
- [CFReadStreamGetError(_:)](corefoundation/cfreadstreamgeterror(_:).md)
- [CFReadStreamGetStatus(_:)](corefoundation/cfreadstreamgetstatus(_:).md)
