Class TextFileSystemViewCrudMapAdapter.Builder<Entry>

    • Method Detail

      • build

        public CrudMapAdapter<String,​String> build()
        Creates a new CrudMapAdapter that uses the configured ICommonFileSystem to read and write file text content. The map key is the file ID (as returned by the configured entry encoder), the map value is the file's text content. Uses the configured charset to encode and decode the binary data to/ from strings.

        Subsequent changes to the builder will not affect the returned CrudMapAdapter.

        Returns:
        The new CrudMapAdapter.
      • buildMap

        public Map<String,​String> buildMap()
        Shortcut for building the CrudMapAdapter and creating a new CrudMap with that adapter.

        Uses the configured ICommonFileSystem to read and write file text content. The map key is the file ID (as returned by the configured entry encoder), the map value is the file's text content. Uses the configured charset to encode and decode the binary data to/ from strings.

        Subsequent changes to the builder will not affect the returned CrudMapAdapter.

        Returns:
        A new map using the built CrudMapAdapter.
      • charset

        public TextFileSystemViewCrudMapAdapter.Builder<Entry> charset​(Charset charset)
        Sets the charset to use for encoding and decoding the binary data to / from strings. If not set, UTF-8 will be used.
        Parameters:
        charset - The charset to use.
        Returns:
        This builder for chaining calls.