Class CharsetConverter

All Implemented Interfaces:
Converter, Initable, Proxy

@Generated("org.javagi.JavaGI") public class CharsetConverter extends GObject implements Converter, Initable
GCharsetConverter is an implementation of Converter based on GLib.IConv.
  • Constructor Details

    • CharsetConverter

      public CharsetConverter(MemorySegment address)
      Create a CharsetConverter instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • CharsetConverter

      public CharsetConverter(String toCharset, String fromCharset) throws GErrorException
      Creates a new GCharsetConverter.
      Parameters:
      toCharset - destination charset
      fromCharset - source charset
      Throws:
      GErrorException - see GError
      Since:
      2.24
    • CharsetConverter

      public CharsetConverter()
      Create a new CharsetConverter.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the CharsetConverter class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected CharsetConverter asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getNumFallbacks

      public int getNumFallbacks()
      Gets the number of fallbacks that this CharsetConverter has applied so far.
      Returns:
      the number of fallbacks that this CharsetConverter has applied
      Since:
      2.24
    • getUseFallback

      public boolean getUseFallback()
      Gets the GCharsetConverter:use-fallback property.
      Returns:
      true if fallbacks are used by this CharsetConverter
      Since:
      2.24
    • setUseFallback

      public void setUseFallback(boolean useFallback)
      Sets the GCharsetConverter:use-fallback property.
      Parameters:
      useFallback - true to use fallbacks
      Since:
      2.24
    • builder

      public static CharsetConverter.Builder<? extends CharsetConverter.Builder> builder()
      A CharsetConverter.Builder object constructs a CharsetConverter with the specified properties. Use the various set...() methods to set properties, and finish construction with CharsetConverter.Builder.build().
      Returns:
      the builder object