public class SVNDiffInstruction
extends java.lang.Object
For now there are three types of copy instructions:
COPY_FROM_SOURCE
: that is when bytes are copied from
a source view (for example, existing revision of a file) to the target
one.
COPY_FROM_NEW_DATA
: new data bytes (e.g. new
text) are copied to the target view.
COPY_FROM_TARGET
: that is, when a sequence of bytes in the
target must be repeated.
Modifier and Type | Field and Description |
---|---|
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.
|
int |
length
A length bytes to copy.
|
int |
offset
An offset in the source from where the bytes
should be copied.
|
int |
type
A type of this instruction.
|
Constructor and Description |
---|
SVNDiffInstruction()
Creates a new instruction object.
|
SVNDiffInstruction(int t,
int l,
int o)
Creates a particular type of a diff instruction.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Gives a string representation of this object.
|
static void |
writeInt(java.nio.ByteBuffer os,
int i)
Writes an integer to a byte buffer.
|
static void |
writeLong(java.nio.ByteBuffer os,
long i)
Writes a long to a byte buffer.
|
void |
writeTo(java.nio.ByteBuffer target)
Wirtes this instruction to a byte buffer.
|
public static final int COPY_FROM_SOURCE
public static final int COPY_FROM_TARGET
public static final int COPY_FROM_NEW_DATA
public int type
public int length
public int offset
public SVNDiffInstruction(int t, int l, int o)
t
- a type of an instructionl
- a number of bytes to copyo
- 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 copiedSVNDiffWindow
public SVNDiffInstruction()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeTo(java.nio.ByteBuffer target)
target
- a byte buffer to write topublic static void writeInt(java.nio.ByteBuffer os, int i)
os
- a byte buffer to write toi
- an integer to writepublic static void writeLong(java.nio.ByteBuffer os, long i)
os
- a byte buffer to write toi
- a long number to writeCopyright © 2004-2012 TMate Software Ltd. All Rights Reserved.