Class ProcessorUtil
java.lang.Object
org.nuiton.processor.ProcessorUtil
Utilities methods.
- Since:
- 1.0.0.0
- Author:
- tchemit <chemit@codelutin.com>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTo extract all content inside the header and footer.static classTo remove all content inside the header and footer. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem encoding (use as fall back for deprecated method with no given encoding. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.static voidLaunch the process of the givenprocessorto the given files.static voiddoProcess(Processor processor, InputStreamReader in, OutputStreamWriter out) Launch the process of the givenprocessorto the given readers.static voiddoProcess(Processor processor, InputStream in, OutputStream out, String encoding) Launch the process of the givenprocessorto the given streams.static voidDeprecated.since 1.0.4, prefer use thedoProcess(Processor, String, String, String).static voidLaunch the process of the givenprocessorto the given files.static Filter[]getFilters(String filters, String separator) Instanciate a array of filters given by thier FQN separated by the given separator.static ProcessornewProcessor(String filters, String separator) Instanciate a newProcessorgiven an array of filters given by their FQN separated by the given separator.
-
Field Details
-
DEFAULT_ENCODING
System encoding (use as fall back for deprecated method with no given encoding.- Since:
- 1.0.4
-
-
Constructor Details
-
ProcessorUtil
public ProcessorUtil()
-
-
Method Details
-
newProcessor
-
getFilters
Instanciate a array of filters given by thier FQN separated by the given separator.- Parameters:
filters- the list of filters separated by the given separatorseparator- filter separator- Returns:
- the array of instanciated filters.
- Throws:
Exception- if any pb
-
doProcess
public static void doProcess(Processor processor, String in, String out, String encoding) throws IOException Launch the process of the givenprocessorto the given files.- Parameters:
processor- the processor to launchin- the input fileout- the output fileencoding- encoding to use to read and write files- Throws:
IOException- if any problems while processing file- Since:
- 1.0.4
-
doProcess
@Deprecated public static void doProcess(Processor processor, String in, String out) throws IOException Deprecated.since 1.0.4, prefer use thedoProcess(Processor, String, String, String).Launch the process of the givenprocessorto the given files.- Parameters:
processor- the processor to launchin- the input fileout- the output file- Throws:
IOException- if any problems while processing file- Since:
- 1.0.3
-
doProcess
public static void doProcess(Processor processor, File in, File out, String encoding) throws IOException Launch the process of the givenprocessorto the given files.- Parameters:
processor- the processor to launchin- the input fileout- the output fileencoding- encoding to use to read and write files.- Throws:
IOException- if any problems while processing file- Since:
- 1.0.4
-
doProcess
public static void doProcess(Processor processor, InputStream in, OutputStream out, String encoding) throws IOException Launch the process of the givenprocessorto the given streams.- Parameters:
processor- the processor to launchin- the input fileout- the output fileencoding- encoding to use to read and write files.- Throws:
IOException- if any problems while processing file- Since:
- 1.1
-
doProcess
public static void doProcess(Processor processor, InputStreamReader in, OutputStreamWriter out) throws IOException Launch the process of the givenprocessorto the given readers.- Parameters:
processor- the processor to launchin- the input fileout- the output file- Throws:
IOException- if any problems while processing file- Since:
- 1.1
-
doProcess
Deprecated.since 1.0.4, prefer use thedoProcess(Processor, File, File, String).Launch the process of the givenprocessorto the given files using the system default encoding.- Parameters:
processor- the processor to launchin- the input fileout- the output file- Throws:
IOException- if any problems while processing file- Since:
- 1.0.3
-
doProcess(Processor, File, File, String).