public class FileCompare
extends java.lang.Object
| Constructor and Description |
|---|
FileCompare()
Creates a new FileCompare object
|
FileCompare(boolean keepTempFiles)
Creates a new FileCompare object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareBinary(java.io.InputStream f1,
java.io.InputStream f2)
Compares the input streams binary.
|
boolean |
compareXML(java.io.InputStream f1,
java.io.InputStream f2)
Compare the input streams as XML.
|
java.io.File |
getFileOne()
Gets the intermediary file created
from the first argument of the latest call to compareXML
(as base for the post normalization binary compare).
|
java.io.File |
getFileTwo()
Gets the intermediary file created
from the second argument of the latest call to compareXML
(as base for the post normalization binary compare).
|
int |
getPos()
Gets the byte position where the latest call to compareBinary or compareXML failed, or -1
if compare was successful
|
public FileCompare()
public FileCompare(boolean keepTempFiles)
keepTempFiles - public boolean compareXML(java.io.InputStream f1,
java.io.InputStream f2)
throws java.io.IOException,
javax.xml.transform.TransformerException
f1 - the first input streamf2 - the second input streamjava.io.IOException - if IO failsjavax.xml.transform.TransformerException - if transformation failspublic java.io.File getFileOne()
java.lang.IllegalStateException - if temporary files are not kept
or if compareXML has not been called.public java.io.File getFileTwo()
java.lang.IllegalStateException - if temporary files are not kept
or if compareXML has not been called.public int getPos()
public boolean compareBinary(java.io.InputStream f1,
java.io.InputStream f2)
throws java.io.IOException
f1 - the first input streamf2 - the second input streamjava.io.IOException - if IO fails