|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zig_project.gpl.simulation.IoCompare
Library of functions designed to do simple (true / false) comparison operations on files and streams.
Constructor Summary | |
IoCompare()
|
Method Summary | |
static boolean |
fileCompare(File f1,
File f2)
This method checks two files to determine if their contents are equal. |
static boolean |
readerCompare(Reader r1,
Reader r2)
Checks two readers for equality. |
static InputStream |
stream(File f)
Convenience method to open a stream to a File. |
static boolean |
streamCompare(InputStream i1,
InputStream i2)
Checks two streams for equality. |
static boolean |
subStreamCompare(InputStream i1,
InputStream i2,
long len)
Checks a fragment of two streams for equality. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IoCompare()
Method Detail |
public static boolean fileCompare(File f1, File f2) throws IOException
IOException
public static boolean streamCompare(InputStream i1, InputStream i2) throws IOException
IOException
public static boolean subStreamCompare(InputStream i1, InputStream i2, long len) throws IOException
len
bytes.streamCompare(InputStream, InputStream)
, this method will
not attempt to automatically close the streams, even if they have been
exhausted.
It is recommended that both streams be buffered.
IOException
public static boolean readerCompare(Reader r1, Reader r2) throws IOException
IOException
public static InputStream stream(File f) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |