Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.compare
Interface IStreamMerger

public interface IStreamMerger

This interface defines a single operation for performing a three-way merge on three input streams. The merged result is written to an output stream.

Clients must implement this interface when contributing new mergers to the `org.eclipse.compare.streamMergers` extension point.

Since:
  3.0

Field Summary
`static int` | `CONFLICT` Indicates that a change conflict prevented the merge from successful completion (value `1`)
`static int` | `INTERNAL_ERROR` Status code describing an internal error (value `2`)
`static int` | `OK` Indicates the successful completion of the merge operation (value `IStatus.OK`)

Method Summary
`IStatus` | `merge(OutputStream output, String outputEncoding, InputStream ancestor, String ancestorEncoding, InputStream target, String targetEncoding, InputStream other, String otherEncoding, IProgressMonitor monitor)` Performs a merge operation on the given input streams and writes the merge result to the output stream.

Field Detail

### OK

    public static final int OK

  Indicates the successful completion of the merge operation (value `IStatus.OK`)

  See Also:
    Constant Field Values

### CONFLICT

    public static final int CONFLICT

  Indicates that a change conflict prevented the merge from successful completion (value `1`)

  See Also:
    Constant Field Values

### INTERNAL_ERROR

    public static final int INTERNAL_ERROR

  Status code describing an internal error (value `2`)

  See Also:
    Constant Field Values

Method Detail

### merge

    public IStatus merge(OutputStream output,
                         String outputEncoding,
                         InputStream ancestor,
                         String ancestorEncoding,
                         InputStream target,
                         String targetEncoding,
                         InputStream other,
                         String otherEncoding,
                         IProgressMonitor monitor)

  Performs a merge operation on the given input streams and writes the merge result to the output stream. On success a status `IStatus.OK` is returned, on error a status `IStatus.ERROR`. If the merge operation cannot deal with conflicts, the code of the error status has the value `IStreamMerger.CONFLICT`. For text oriented mergers the encoding for the input and output streams is honored. It is the responsibility of callers to close input and output streams.

  Parameters:
    `output` - the byte stream to which the merge result is written; the merger will not close the stream
    `outputEncoding` - the encoding to use when writing to the output stream
    `ancestor` - the byte stream from which the common ancestor is read
    `ancestorEncoding` - the encoding of the ancestor input byte stream
    `target` - the byte stream containing the target of the merge
    `targetEncoding` - the encoding of the target input byte stream
    `other` - the byte stream containing the target of the merge
    `otherEncoding` - the encoding of the other input byte stream
    `monitor` - reports progress of the merge operation
  Returns:
    returns the completion status of the operation

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.