Interface MergeOutputWriter

All Superinterfaces:
AutoCloseable, Closeable, OpenableCloseable

public interface MergeOutputWriter extends OpenableCloseable
Writes the output of a merge. The output is provided on a path-by-path basis.

Writers need to be open before any operations can be performed and need to be closed to ensure all changes have been persisted.

See MergeOutputWriters for some common implementations.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(String path, InputStream data, boolean compress)
    Creates a new path in the output.
    void
    remove(String path)
    Removes a path from the output.
    void
    replace(String path, InputStream data, boolean compress)
    Replaces a path's contents with new contents.

    Methods inherited from interface java.io.Closeable

    close

    Methods inherited from interface com.android.builder.merge.OpenableCloseable

    open
  • Method Details

    • remove

      void remove(@NonNull String path)
      Removes a path from the output.
      Parameters:
      path - the path to remove
    • create

      void create(@NonNull String path, @NonNull InputStream data, boolean compress)
      Creates a new path in the output.
      Parameters:
      path - the path to create
      data - the path's data
      compress - whether the data will be compressed
    • replace

      void replace(@NonNull String path, @NonNull InputStream data, boolean compress)
      Replaces a path's contents with new contents.
      Parameters:
      path - the path to replace
      data - the new path's data
      compress - whether the data will be compressed