Class PrintUtil
java.lang.Object
net.sf.jailer.util.PrintUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyTemplate(String template, Object[] arguments) Applies arguments to template.applyTemplate(String template, Map<String, String> arguments, Map<String, List<String>> listArguments) Applies arguments to template.static StringformatVitalTime(long time) Formats a time value in milliseconds as a human-readable string (HH:MM:SS.t).Loads a file.Loads a file.loadResource(String name) Loads a file.static voidloadTableList(List<String> list, InputStream in) Loads table list file and fill a list.static voidloadTableList(List<String> list, String fileName) Loads table list file and fill a list.tableSetAsString(Set<Table> tables) Converts a set of tables into a string.tableSetAsString(Set<Table> tables, String linePrefix) Converts a set of tables into a string.
-
Field Details
-
LINE_SEPARATOR
-
-
Constructor Details
-
PrintUtil
public PrintUtil()
-
-
Method Details
-
tableSetAsString
-
tableSetAsString
-
loadResource
Loads a file.- Parameters:
name- the file to load- Returns:
- content of file
- Throws:
FileNotFoundExceptionIOException
-
applyTemplate
public String applyTemplate(String template, Object[] arguments) throws FileNotFoundException, IOException Applies arguments to template.- Parameters:
template- file name of templatearguments- the arguments- Returns:
- template with arguments filled in
- Throws:
FileNotFoundExceptionIOException
-
applyTemplate
public String applyTemplate(String template, Map<String, String> arguments, Map<String, throws FileNotFoundException, IOExceptionList<String>> listArguments) Applies arguments to template.- Parameters:
template- file name of templatearguments- the arguments (named values)- Returns:
- template with arguments filled in
- Throws:
FileNotFoundExceptionIOException
-
loadTableList
Loads table list file and fill a list.- Parameters:
list- to fillfileName- name of file- Throws:
IOException
-
loadTableList
Loads table list file and fill a list.- Parameters:
list- to fillin- to read from- Throws:
IOException
-
loadFile
Loads a file.- Parameters:
file- the file to load- Returns:
- content of file
- Throws:
FileNotFoundExceptionIOException
-
loadFile
public String loadFile(String file, boolean ignoreComments) throws FileNotFoundException, IOException Loads a file.- Parameters:
file- the file to load- Returns:
- content of file
- Throws:
FileNotFoundExceptionIOException
-
formatVitalTime
Formats a time value in milliseconds as a human-readable string (HH:MM:SS.t).- Parameters:
time- the time in milliseconds- Returns:
- formatted time string
-