com.hazelcast.jet.pipeline

## Class FileSinkBuilder<T>

- java.lang.Object
- - com.hazelcast.jet.pipeline.FileSinkBuilder<T>

- Type Parameters:
    `T` - type of the items the sink accepts

      public final class FileSinkBuilder<T>
      extends Object

  See `Sinks.filesBuilder(java.lang.String)`.
  Since:
    3.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FileSinkBuilder<T>` | `append(boolean append)` Sets whether to append (`true`) or overwrite (`false`) an existing file.
    `Sink<T>` | `build()` Creates and returns the file `Sink` with the supplied components.
    `FileSinkBuilder<T>` | `charset(Charset charset)` Sets the character set used to encode the files.
    `FileSinkBuilder<T>` | `toStringFn(FunctionEx<? super T,String> toStringFn)` Sets the function which converts the item to its string representation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### toStringFn

          public FileSinkBuilder<T> toStringFn(@Nonnull
                                               FunctionEx<? super T,String> toStringFn)

      Sets the function which converts the item to its string representation. Each item is followed with a platform-specific line separator. Default value is `Object.toString()`.

    - #### charset

          public FileSinkBuilder<T> charset(@Nonnull
                                            Charset charset)

      Sets the character set used to encode the files. Default value is `StandardCharsets.UTF_8`.

    - #### append

          public FileSinkBuilder<T> append(boolean append)

      Sets whether to append (`true`) or overwrite (`false`) an existing file. Default value is `false`.

    - #### build

          public Sink<T> build()

      Creates and returns the file `Sink` with the supplied components.

Copyright © 2020. All rights reserved.