Converter
Object Hierarchy:
Description:
public interface Converter :
Object
Provides an interface for converting data from one type to another type. The conversion can be stateful and may fail at any place.
All known implementing classes:
Namespace: GLib
Package: gio-2.0
Content:
Methods:
-
public abstract ConverterResult convert (uint8[] inbuf, uint8[] outbuf, ConverterFlags flags, out size_t bytes_read, out size_t bytes_written) throws Error
This is the main operation used when converting data. It is to be called multiple times in a loop, and
each time it will do some work, i.e. producing some output (in outbuf) or consuming some input (from inbuf
) or both. If its not possible to do any work an error is returned.
-
public abstract void reset ()
Resets all internal state in the converter, making it behave as if it was just created. If the
converter has any internal state that would produce output then that output is lost.