Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DataInputStreamMeta

[205:14] static extends: object

Generated metadata helpers for DataInputStream class surfaces.

Methods

  • properties ()

    Returns property metadata for DataInputStream.

    • @r A list.

class: DataInputStream

[14:7] extends: object

Data input stream implements [class@Gio.InputStream] and includes functions for reading structured data directly from a binary input stream.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • DataInputStream (base_stream = null)

    Creates a new data input stream for the @base_stream.

    • @p base_stream is a #GInputStream..
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asBufferedInputStream ()

    Wraps this handle as BufferedInputStream.

    • @r A BufferedInputStream object.
  • asSeekable ()

    Wraps this handle as Seekable.

    • @r A Seekable object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setByteorder (string Value)

    The :byte-order property determines the byte ordering that is used when reading multi-byte entities (such as integers) from the stream.

    • @p Value is the new property value.
    • @r None.
  • setNewlinetype (string Value)

    The :newline-type property determines what is considered as a line ending when reading complete lines from the stream.

    • @p Value is the new property value.
    • @r None.
  • get_byte_order ()

    Gets the byte order for the data input stream.

  • get_newline_type ()

    Gets the current newline type for the @stream.

  • set_byte_order (string order)

    This function sets the byte order for the given @stream. All subsequent reads from the @stream will be read in the given @order.

    • @p order is a #GDataStreamByteOrder to set..
    • @r None.
  • set_newline_type (string type)

    Sets the newline type for the @stream. Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read chunk ends in "CR" we must read an additional byte to know if this is "CR" or "CR LF", and this might block if there is no more data available.

    • @p type is the type of new line return as #GDataStreamNewlineType..
    • @r None.