Interface ImpExFragment
- All Known Implementing Classes:
ConstantTextFragment,DataHubDataFragment,ImpexMacroFragment
public interface ImpExFragment
A logical block of an ImpEx script, e.g. a header, data block, macros, etc.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a line of the script to this block.booleanaddLine(String line, List<ImpExFragment> fragments) Adds a line of the script to this block.Reads back the content of this script block.Retrieves an input stream to read content of this fragment.
-
Method Details
-
addLine
Adds a line of the script to this block.- Parameters:
line- a line of script text- Returns:
true, if the line is added;false, if the line does not belong to this block.- Throws:
ImpexValidationException- when a line is invalid
-
addLine
Adds a line of the script to this block.- Parameters:
line- a line of script text- Returns:
true, if the line is added;false, if the line does not belong to this block.- Throws:
ImpexValidationException- when a line is invalid
-
getContent
Reads back the content of this script block.- Returns:
- content of this script block or an empty string, if this block is empty.
- Throws:
IOException- if failed to read this fragment content.
-
getContentAsInputStream
Retrieves an input stream to read content of this fragment.- Returns:
- an input stream to read content of this fragment.
- Throws:
IOException- if failed to create an input stream for the fragment content.
-