Overview | Package | Class | Tree | Deprecated | Index | Help
| JavaSVN Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.tmatesoft.svn.core.io.diff
Class SVNDiffInstruction

    java.lang.Object
      org.tmatesoft.svn.core.io.diff.SVNDiffInstruction

public class SVNDiffInstruction
extends Object

The SVNDiffInstruction class represents instructions used to apply delta.

For now there are three types of copy instructions:

- `COPY_FROM_SOURCE`: that is when bytes are copied from the source (for example, existing revision of a file) to the target what means that those bytes are left the same as in the source
- `COPY_FROM_NEW_DATA`: new data is some new bytes that a user has added to an existing revision of a file, i.e. bytes of the user's changes, in other words
- `COPY_FROM_TARGET`: that is, when a sequence of bytes in the target must be repeated

When a new file is added to a repository in a particular revision, its contents are entirely new data. But all the further changed revisions of this file may be got as copying some source bytes from a previous revision and some new bytes that were added only in the latest (at any point) revision.

Version:
  1.0
Author:
  TMate Software Ltd.

Field Summary
`static int` | `COPY_FROM_NEW_DATA` A type of an instruction that says that data must be copied from the new data to the target view.
`static int` | `COPY_FROM_SOURCE` A type of an instruction that says that data must be copied from the source view to the target one.
`static int` | `COPY_FROM_TARGET` A type of an instruction that says that data must be copied from the target view to the target itself.
`long` | `length` A length bytes to copy.
`long` | `offset` An offset in the source from where the bytes should be copied.
`int` | `type` A type of this instruction.

Constructor Summary
`SVNDiffInstruction()` Creates a new instruction object.
`SVNDiffInstruction(int t, long l, long o)` Creates a particular type of a diff instruction.

Method Summary
`String` | `toString()` Gives a string representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### COPY_FROM_SOURCE

    public static final int COPY_FROM_SOURCE

  A type of an instruction that says that data must be copied from the source view to the target one.

  See Also:
    Constant Field Values

### COPY_FROM_TARGET

    public static final int COPY_FROM_TARGET

  A type of an instruction that says that data must be copied from the target view to the target itself.

  See Also:
    Constant Field Values

### COPY_FROM_NEW_DATA

    public static final int COPY_FROM_NEW_DATA

  A type of an instruction that says that data must be copied from the new data to the target view.

  See Also:
    Constant Field Values

### type

    public int type

  A type of this instruction.

### length

    public long length

  A length bytes to copy.

### offset

    public long offset

  An offset in the source from where the bytes should be copied. Instruction offsets are relative to the bounds of views, i.e. a source/target view is a window of bytes (specified in a concrete diff window) in the source/target stream (this can be a file, a buffer).

Constructor Detail

### SVNDiffInstruction

    public SVNDiffInstruction(int t,
                              long l,
                              long o)

  Creates a particular type of a diff instruction. Instruction offsets are relative to the bounds of views, i.e. a source/target view is a window of bytes (specified in a concrete diff window) in the source/target stream (this can be a file, a buffer).

Parameters:
  `t` - a type of an instruction
  `l` - a number of bytes to copy
  `o` - an offset in the source (which may be a source or a target view, or a new data stream) from where the bytes are to be copied
See Also:
  `SVNDiffWindow`

### SVNDiffInstruction

    public SVNDiffInstruction()

  Creates a new instruction object. It's the instruction for the empty contents file.

Method Detail

### toString

    public String toString()

  Gives a string representation of this object.

  Returns:
    a string representation of this object

Overview | Package | Class | Tree | Deprecated | Index | Help
| JavaSVN Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 TMate Software Ltd. All Rights Reserved.