com.starteam.diff
Class ConsoleWriter

java.lang.Object
  extended by com.starteam.diff.EditListWriter
      extended by com.starteam.diff.ConsoleWriter

public final class ConsoleWriter
extends EditListWriter

This interface can be used when reconstructing a target from a source and a delta


Constructor Summary
ConsoleWriter(java.io.Writer output, boolean lineNumbers, int tabs, int contextLines, ParsedCharSequence source, ParsedCharSequence target)
          Construct a Console Writer
 
Method Summary
 void deleteLines(int sourceStart, int targetStart, int length)
          delete lines from source and target
 void finish()
          called when the last lines are being processed
 void insertLines(int sourceStart, int targetStart, int length)
          called when lines are inserted
 void replaceLines(int sourcePos, int sourceLen, int targetPos, int targetLen)
          replace lines in source and target
 void start()
          start writing
 void unchangedLines(int sourceStart, int targetStart, int length)
          lines to leave unchanged
 
Methods inherited from class com.starteam.diff.EditListWriter
write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleWriter

public ConsoleWriter(java.io.Writer output,
                     boolean lineNumbers,
                     int tabs,
                     int contextLines,
                     ParsedCharSequence source,
                     ParsedCharSequence target)
Construct a Console Writer

Parameters:
output - the output to write to
lineNumbers - true if line numbers are to be written
tabs - the tab length if any
contextLines - the number of context lines
source - the source sequence to use
target - the target sequence to reconstruct
Method Detail

start

public void start()
           throws java.io.IOException
start writing

Specified by:
start in class EditListWriter
Throws:
java.io.IOException

finish

public void finish()
            throws java.io.IOException
Description copied from class: EditListWriter
called when the last lines are being processed

Specified by:
finish in class EditListWriter
Throws:
java.io.IOException - an exception on failure

unchangedLines

public void unchangedLines(int sourceStart,
                           int targetStart,
                           int length)
                    throws java.io.IOException
lines to leave unchanged

Specified by:
unchangedLines in class EditListWriter
Parameters:
sourceStart - the start source position
targetStart - the target start position
length - the number of lines to leave unchanged
Throws:
java.io.IOException - an exception on failure

insertLines

public void insertLines(int sourceStart,
                        int targetStart,
                        int length)
                 throws java.io.IOException
Description copied from class: EditListWriter
called when lines are inserted

Specified by:
insertLines in class EditListWriter
Parameters:
sourceStart - the start line in the source
targetStart - the start line in the target
length - the number of lines to insert
Throws:
java.io.IOException - an exception on failure

deleteLines

public void deleteLines(int sourceStart,
                        int targetStart,
                        int length)
                 throws java.io.IOException
delete lines from source and target

Specified by:
deleteLines in class EditListWriter
Parameters:
sourceStart - delete from
targetStart - delete from
length - the number of lines to delete
Throws:
java.io.IOException - an exception on failure

replaceLines

public void replaceLines(int sourcePos,
                         int sourceLen,
                         int targetPos,
                         int targetLen)
                  throws java.io.IOException
replace lines in source and target

Specified by:
replaceLines in class EditListWriter
Parameters:
sourcePos - the source start position
sourceLen - the source length
targetPos - the target start position
targetLen - the target length
Throws:
java.io.IOException - an exception on failure


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.