com.nothome.delta.text
Class TextPatcher

java.lang.Object
  extended by com.nothome.delta.text.TextPatcher

public class TextPatcher
extends Object

Converts a text patch and source file to a resulting target file.


Constructor Summary
TextPatcher(CharSequence source)
          Constructs a new TextPatcher with a source to patch.
TextPatcher(SeekableSource source)
          Constructs a new TextPatcher with a generic source.
 
Method Summary
 String patch(CharSequence patch)
          Patch from a string, return the result.
 void patch(Reader patch, Writer out)
          Patches a source to an output file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextPatcher

public TextPatcher(SeekableSource source)
            throws IOException
Constructs a new TextPatcher with a generic source.

Throws:
IOException

TextPatcher

public TextPatcher(CharSequence source)
Constructs a new TextPatcher with a source to patch.

Method Detail

patch

public String patch(CharSequence patch)
Patch from a string, return the result.


patch

public void patch(Reader patch,
                  Writer out)
           throws IOException
Patches a source to an output file.

Parameters:
out - The output must be closed by the caller
Throws:
IOException


Copyright © 2003-2008. All Rights Reserved.