at.gv.egiz.pdfas.impl.input.correction
Class ExternalCorrector

java.lang.Object
  extended byat.gv.egiz.pdfas.impl.input.correction.ExternalCorrector
All Implemented Interfaces:
Corrector

public class ExternalCorrector
extends Object
implements Corrector

Corrects the document using an extrenal commandline tool.

Process.destroy after a certain timeout does not work if the executable is a Windows batch file.

Author:
wprinz

Nested Class Summary
protected static class ExternalCorrector.ReaderPrinter
           
protected static class ExternalCorrector.TimeoutThread
           
 
Field Summary
static String COMMANDLINE_KEY
           
protected static int DEFAULT_TIMEOUT
           
static String INPUT_DOCUMENT_REPLACE
           
static String OUTPUT_DOCUMENT_REPLACE
           
static String TIMEOUT_KEY
           
 
Constructor Summary
ExternalCorrector()
           
 
Method Summary
 PdfDataSource correctDocument(PdfDataSource document)
          Corrects the given PDF document to a form that PDF-AS can use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_DOCUMENT_REPLACE

public static final String INPUT_DOCUMENT_REPLACE
See Also:
Constant Field Values

OUTPUT_DOCUMENT_REPLACE

public static final String OUTPUT_DOCUMENT_REPLACE
See Also:
Constant Field Values

COMMANDLINE_KEY

public static final String COMMANDLINE_KEY
See Also:
Constant Field Values

TIMEOUT_KEY

public static final String TIMEOUT_KEY
See Also:
Constant Field Values

DEFAULT_TIMEOUT

protected static final int DEFAULT_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

ExternalCorrector

public ExternalCorrector()
Method Detail

correctDocument

public PdfDataSource correctDocument(PdfDataSource document)
                              throws CorrectorException
Description copied from interface: Corrector
Corrects the given PDF document to a form that PDF-AS can use.

Specified by:
correctDocument in interface Corrector
Parameters:
document - The (incorrect) PDF document.
Returns:
Returns the corrected PDF document.
Throws:
CorrectorException - Exception thrown if the document couldn't be corrected.
See Also:
Corrector.correctDocument(at.gv.egiz.pdfas.framework.input.PdfDataSource)


Copyright © 2006-2010. All Rights Reserved.