|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hpsf.examples.CopyCompare
public class CopyCompare
This class copies a POI file system to a new file and compares the copy with the original.
Property set streams are copied logically, i.e. the application
establishes a PropertySet
of an original property
set, creates a MutablePropertySet
from the
PropertySet
and writes the
MutablePropertySet
to the destination POI file
system. - Streams which are no property set streams are copied bit by
bit.
The comparison of the POI file systems is done logically. That means that the two disk files containing the POI file systems do not need to be exactly identical. However, both POI file systems must contain the same files, and most of these files must be bitwise identical. Property set streams, however, are compared logically: they must have the same sections with the same attributs, and the sections must contain the same properties. Details like the ordering of the properties do not matter.
Constructor Summary | |
---|---|
CopyCompare()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Runs the example program. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CopyCompare()
Method Detail |
---|
public static void main(java.lang.String[] args) throws NoPropertySetStreamException, MarkUnsupportedException, java.io.UnsupportedEncodingException, java.io.IOException
Runs the example program. The application expects one or two arguments:
The first argument is the disk file name of the POI filesystem to copy.
The second argument is optional. If it is given, it is the name of a disk file the copy of the POI filesystem will be written to. If it is not given, the copy will be written to a temporary file which will be deleted at the end of the program.
args
- Command-line arguments.
MarkUnsupportedException
- if a POI document stream does not
support the mark() operation.
NoPropertySetStreamException
- if the application tries to
create a property set from a POI document stream that is not a property
set stream.
java.io.IOException
- if any I/O exception occurs.
java.io.UnsupportedEncodingException
- if a character encoding is not
supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |