public class DocViewFormat
extends java.lang.Object
| Constructor and Description |
|---|
DocViewFormat() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
format(java.io.File file,
boolean dryRun)
Formats a given file using the
OutputFormat returned by getXmlOutputFormat(). |
java.util.List<java.lang.String> |
format(java.io.File directory,
java.util.List<java.util.regex.Pattern> filenamePatterns,
boolean dryRun)
Formats given files using the
OutputFormat returned by getXmlOutputFormat() by traversing the directory
tree given as file. |
OutputFormat |
getXmlOutputFormat()
Returns the
OutputFormat used by DocViewSerializer when writing doc view xml
files. |
public OutputFormat getXmlOutputFormat()
OutputFormat used by DocViewSerializer when writing doc view xml
files.public boolean format(java.io.File file,
boolean dryRun)
throws java.io.IOException
OutputFormat returned by getXmlOutputFormat().
The file is replaced on disk but only if wasn't already formatted correctly and if dryRun is false.file - the file to formatdryRun - If true, then the file is never replaced on disk.true if the formatted version differs from the original.java.io.IOException - if an I/O error occurspublic java.util.List<java.lang.String> format(java.io.File directory,
java.util.List<java.util.regex.Pattern> filenamePatterns,
boolean dryRun)
throws java.io.IOException
OutputFormat returned by getXmlOutputFormat() by traversing the directory
tree given as file. Only those files will be formatted, that have a filename matching at least one of the given filenamePatterns,
and only if dryRun is false.directory - the start directoryfilenamePatterns - list of regexp patternsdryRun - If true, then the file is never replaced on disk.format(File, boolean)java.io.IOException - in case there is an exception during traversal or formatting. That means formatting will fail on the first error that appearedCopyright © 2010 - 2023 Adobe. All Rights Reserved