Package org.gnome.gio
Class ZlibCompressor.Builder<B extends ZlibCompressor.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.ZlibCompressor.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
ZlibCompressor
public static class ZlibCompressor.Builder<B extends ZlibCompressor.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theZlibCompressorobject.setFileInfo(FileInfo fileInfo) AFileInfocontaining file information to put into the gzip header.setFormat(ZlibCompressorFormat format) The format of the compressed data.setLevel(int level) The level of compression from0(no compression) to9(most compression).setOs(int os) The OS code of the gzip header.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theZlibCompressorobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toZlibCompressor.- Overrides:
buildin classGObject.Builder<B extends ZlibCompressor.Builder<B>>- Returns:
- a new instance of
ZlibCompressorwith the properties that were set in the Builder object.
-
setFileInfo
AFileInfocontaining file information to put into the gzip header.The file name and modification time from the file info will be used.
This will only be used if non-
NULLandGio.ZlibCompressor:formatisGio.ZlibCompressorFormat.GZIP.- Parameters:
fileInfo- the value for thefile-infoproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.26
-
setFormat
The format of the compressed data.- Parameters:
format- the value for theformatproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.24
-
setLevel
The level of compression from0(no compression) to9(most compression).-1for the default level.- Parameters:
level- the value for thelevelproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.24
-
setOs
The OS code of the gzip header.This will be used if set to a non-negative value, and if
Gio.ZlibCompressor:formatisGio.ZlibCompressorFormat.GZIP, the compressor will set the OS code of the gzip header to this value.If the value is unset, zlib will set the OS code depending on the platform. This may be undesirable when reproducible output is desired. In that case setting the OS code to
3(for Unix) is recommended.- Parameters:
os- the value for theosproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.86
-