Package org.smooks.support
Class SmooksUtil
- java.lang.Object
-
- org.smooks.support.SmooksUtil
-
public final class SmooksUtil extends Object
Smooks
utilities.- Author:
- tom.fennelly@gmail.com
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
filterAndSerialize(ExecutionContext executionContext, InputStream stream, Smooks smooks)
Utility method to filter the content in the specifiedInputStream
for the specifiedExecutionContext
.static void
registerProfileSet(ProfileSet profileSet, Smooks smooks)
Manually register a set of profiles with the profile store associated with the suppliedSmooks
instance.
-
-
-
Method Detail
-
registerProfileSet
public static void registerProfileSet(ProfileSet profileSet, Smooks smooks)
Manually register a set of profiles with the profile store associated with the suppliedSmooks
instance. ProfileSets will typically be registered via the config, but it is useful to be able to perform this task manually.- Parameters:
profileSet
- The profile set to be registered.smooks
- TheSmooks
instance on which to perform the configuration operation.
-
filterAndSerialize
public static String filterAndSerialize(ExecutionContext executionContext, InputStream stream, Smooks smooks) throws SmooksException
Utility method to filter the content in the specifiedInputStream
for the specifiedExecutionContext
. Useful for testing purposes. In a real scenario, useSmooks#filter(ExecutionContext, javax.xml.transform.Source, javax.xml.transform.Result)
. The content of the returned String is totally dependent on the configuredDOMElementVisitor
andSerializerVisitor
implementations.- Parameters:
executionContext
- Execution context for the filter.stream
- Stream to be processed. Will be closed before returning.smooks
- TheSmooks
instance through which to perform the filter and serialize operations.- Returns:
- The Smooks processed content buffer.
- Throws:
IOException
- Exception using or closing the supplied InputStream.SmooksException
- Excepting processing content stream.
-
-