Input stream classes

Input stream classes

Functions

Properties

gpointer input-stream Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GArrowInputStream
       ╰── GArrowSeekableInputStream
           ├── GArrowBufferInputStream
           ├── GArrowGIOInputStream
           ╰── GArrowMemoryMappedInputStream
    ╰── GArrowInputStream
        ╰── GArrowSeekableInputStream
            ├── GArrowBufferInputStream
            ├── GArrowGIOInputStream
            ╰── GArrowMemoryMappedInputStream

Implemented Interfaces

GArrowInputStream implements

GArrowSeekableInputStream implements

GArrowBufferInputStream implements

GArrowMemoryMappedInputStream implements

GArrowGIOInputStream implements

Includes

#include <arrow-glib/arrow-glib.h>

Description

GArrowInputStream is a base class for input stream.

GArrowSeekableInputStream is a base class for input stream that supports random access.

GArrowBufferInputStream is a class to read data on buffer.

GArrowMemoryMappedInputStream is a class to read data in file by mapping the file on memory. It supports zero copy.

GArrowGIOInputStream is a class for GInputStream based input stream.

Functions

garrow_seekable_input_stream_get_size ()

guint64
garrow_seekable_input_stream_get_size (GArrowSeekableInputStream *input_stream,
                                       GError **error);

Parameters

input_stream

A GArrowSeekableInputStream.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The size of the file.


garrow_seekable_input_stream_get_support_zero_copy ()

gboolean
garrow_seekable_input_stream_get_support_zero_copy
                               (GArrowSeekableInputStream *input_stream);

Parameters

input_stream

A GArrowSeekableInputStream.

 

Returns

Whether zero copy read is supported or not.


garrow_seekable_input_stream_read_at ()

GArrowBuffer *
garrow_seekable_input_stream_read_at (GArrowSeekableInputStream *input_stream,
                                      gint64 position,
                                      gint64 n_bytes,
                                      GError **error);

Parameters

input_stream

A GArrowSeekableInputStream.

 

position

The read start position.

 

n_bytes

The number of bytes to be read.

 

error

Return location for a GError or NULL.

[nullable]

Returns

GArrowBuffer that has read data on success, NULL if there was an error.

[transfer full][nullable]


garrow_seekable_input_stream_read_tensor ()

GArrowTensor *
garrow_seekable_input_stream_read_tensor
                               (GArrowSeekableInputStream *input_stream,
                                gint64 position,
                                GError **error);

Parameters

input_stream

A GArrowSeekableInputStream.

 

position

The read start position.

 

error

Return location for a GError or NULL.

[nullable]

Returns

GArrowTensor on success, NULL on error.

[transfer full][nullable]

Since 0.4.0


garrow_buffer_input_stream_new ()

GArrowBufferInputStream *
garrow_buffer_input_stream_new (GArrowBuffer *buffer);

Parameters

buffer

The buffer to be read.

 

Returns

A newly created GArrowBufferInputStream.


garrow_buffer_input_stream_get_buffer ()

GArrowBuffer *
garrow_buffer_input_stream_get_buffer (GArrowBufferInputStream *input_stream);

Parameters

input_stream

A GArrowBufferInputStream.

 

Returns

The data of the array as GArrowBuffer.

[transfer full]


garrow_memory_mapped_input_stream_new ()

GArrowMemoryMappedInputStream *
garrow_memory_mapped_input_stream_new (const gchar *path,
                                       GError **error);

Parameters

path

The path of the file to be mapped on memory.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created GArrowMemoryMappedInputStream or NULL on error.

[nullable]


garrow_gio_input_stream_new ()

GArrowGIOInputStream *
garrow_gio_input_stream_new (GInputStream *gio_input_stream);

Parameters

gio_input_stream

The stream to be read.

 

Returns

A newly created GArrowGIOInputStream.

[transfer full]

Since 0.5.0


garrow_gio_input_stream_get_raw ()

GInputStream *
garrow_gio_input_stream_get_raw (GArrowGIOInputStream *input_stream);

Parameters

input_stream

A GArrowGIOInputStream.

 

Returns

The wrapped GInputStream.

[transfer none]

Since 0.5.0

Types and Values

struct GArrowInputStream

struct GArrowInputStream;

It wraps arrow::io::InputStream.


struct GArrowSeekableInputStream

struct GArrowSeekableInputStream;

It wraps arrow::io::RandomAccessFile.


struct GArrowBufferInputStream

struct GArrowBufferInputStream;

It wraps arrow::io::BufferReader.


struct GArrowMemoryMappedInputStream

struct GArrowMemoryMappedInputStream;

It wraps arrow::io::MemoryMappedFile.


struct GArrowGIOInputStream

struct GArrowGIOInputStream;

It's an input stream for GInputStream.

Property Details

The “input-stream” property

  “input-stream”             gpointer

The raw std::shared<arrow::io::InputStream> *.

Flags: Write / Construct Only