| 772 | } |
| 773 | |
| 774 | arrow::Result<int64_t> |
| 775 | Read(int64_t n_bytes, void *out) override |
| 776 | { |
| 777 | std::lock_guard<std::mutex> guard(lock_); |
| 778 | GError *error = NULL; |
| 779 | gsize n_read_bytes = 0; |
| 780 | auto success = |
| 781 | g_input_stream_read_all(input_stream_, out, n_bytes, &n_read_bytes, NULL, &error); |
| 782 | if (success) { |
| 783 | return n_read_bytes; |
| 784 | } else { |
| 785 | return garrow_error_to_status(error, |
| 786 | arrow::StatusCode::IOError, |
| 787 | "[gio-input-stream][read]"); |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | arrow::Result<int64_t> |
| 792 | ReadAt(int64_t position, int64_t n_bytes, void *out) override |
no test coverage detected