Compare commits

..

13 commits
0.4 ... 0.17

58 changed files with 416 additions and 636 deletions

View file

@ -2,23 +2,19 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar" sourcepath="lib/commons-lang3-3.1-sources.jar"/>
<classpathentry kind="lib" path="lib/joda-time-2.3.jar" sourcepath="lib/joda-time-2.3-sources.jar"/>
<classpathentry kind="lib" path="lib/devinsy-strings-0.4.0.jar" sourcepath="lib/devinsy-strings-0.4.0-sources.zip"/>
<classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar" sourcepath="lib/Logs/log4j-1.2.17-source.zip"/>
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.5.jar" sourcepath="lib/Logs/slf4j-api-1.7.5-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.5.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.5-sources.jar"/>
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/>
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.11.jar" sourcepath="lib/UnitTesting/junit-4.11-sources.jar"/>
<classpathentry kind="lib" path="lib/devinsy-rss-0.4.0.jar" sourcepath="lib/devinsy-rss-0.4.0-sources.zip"/>
<classpathentry kind="lib" path="lib/devinsy-xml-0.4.0.jar" sourcepath="lib/devinsy-xml-0.4.0-sources.zip"/>
<classpathentry kind="lib" path="lib/devinsy-cmdexec-0.4.0.jar" sourcepath="lib/devinsy-cmdexec-0.4.0-sources.zip"/>
<classpathentry kind="lib" path="lib/devinsy-unix-0.4.0.jar" sourcepath="lib/devinsy-unix-0.4.0-sources.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/>
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.12.jar" sourcepath="lib/UnitTesting/junit-4.12-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs2021/log4j-api-2.17.1.jar" sourcepath="lib/Logs2021/log4j-api-2.17.1-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs2021/log4j-core-2.17.1.jar" sourcepath="lib/Logs2021/log4j-core-2.17.1-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs2021/log4j-slf4j-impl-2.17.1.jar" sourcepath="lib/Logs2021/log4j-slf4j-impl-2.17.1-sources.jar"/>
<classpathentry kind="lib" path="lib/Logs2021/slf4j-api-1.7.32.jar" sourcepath="lib/Logs2021/slf4j-api-1.7.32-sources.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.13.0.jar" sourcepath="lib/commons-lang3-3.13.0-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View file

@ -1,41 +1,80 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
org.eclipse.jdt.core.formatter.align_with_spaces=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=0
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0
org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assertion_message=0
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_record_components=16
org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
@ -44,6 +83,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
@ -53,11 +93,17 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=next_line
org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=false
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
@ -66,8 +112,11 @@ org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.indent_tag_description=false
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
@ -82,6 +131,7 @@ org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=false
org.eclipse.jdt.core.formatter.indent_empty_lines=false
@ -90,6 +140,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
@ -98,6 +149,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
@ -111,11 +163,14 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
@ -141,10 +196,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arg
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@ -161,6 +223,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not ins
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
@ -169,13 +232,19 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
@ -192,6 +261,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not in
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
@ -218,10 +288,16 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_ar
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@ -233,6 +309,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
@ -248,6 +326,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
@ -258,9 +337,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@ -272,20 +354,66 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_decla
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
org.eclipse.jdt.core.formatter.lineSplit=200
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.text_block_indentation=0
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter

View file

@ -1,3 +1,4 @@
cleanup.add_all=false
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
@ -7,55 +8,145 @@ cleanup.add_missing_nls_tags=false
cleanup.add_missing_override_annotations=true
cleanup.add_missing_override_annotations_interface_methods=true
cleanup.add_serial_version_id=true
cleanup.also_simplify_lambda=true
cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=true
cleanup.always_use_this_for_non_static_method_access=false
cleanup.array_with_curly=false
cleanup.arrays_fill=false
cleanup.bitwise_conditional_expression=false
cleanup.boolean_literal=false
cleanup.boolean_value_rather_than_comparison=true
cleanup.break_loop=false
cleanup.collection_cloning=false
cleanup.comparing_on_criteria=false
cleanup.comparison_statement=false
cleanup.controlflow_merge=false
cleanup.convert_functional_interfaces=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true
cleanup.convert_to_switch_expressions=false
cleanup.correct_indentation=false
cleanup.do_while_rather_than_while=true
cleanup.double_negation=false
cleanup.else_if=false
cleanup.embedded_if=false
cleanup.evaluate_nullable=false
cleanup.extract_increment=false
cleanup.format_source_code=true
cleanup.format_source_code_changes_only=false
cleanup.hash=false
cleanup.if_condition=false
cleanup.insert_inferred_type_arguments=false
cleanup.instanceof=false
cleanup.instanceof_keyword=false
cleanup.invert_equals=false
cleanup.join=false
cleanup.lazy_logical_operator=false
cleanup.make_local_variable_final=false
cleanup.make_parameters_final=true
cleanup.make_private_fields_final=false
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=true
cleanup.map_cloning=false
cleanup.merge_conditional_blocks=false
cleanup.multi_catch=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=true
cleanup.no_string_creation=false
cleanup.no_super=false
cleanup.number_suffix=false
cleanup.objects_equals=false
cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true
cleanup.operand_factorization=false
cleanup.organize_imports=false
cleanup.overridden_assignment=false
cleanup.overridden_assignment_move_decl=true
cleanup.plain_replacement=false
cleanup.precompile_regex=false
cleanup.primitive_comparison=false
cleanup.primitive_parsing=false
cleanup.primitive_rather_than_wrapper=true
cleanup.primitive_serialization=false
cleanup.pull_out_if_from_if_else=false
cleanup.pull_up_assignment=false
cleanup.push_down_negation=false
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=true
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.reduce_indentation=false
cleanup.redundant_comparator=false
cleanup.redundant_falling_through_block_end=false
cleanup.remove_private_constructors=true
cleanup.remove_redundant_modifiers=false
cleanup.remove_redundant_semicolons=true
cleanup.remove_redundant_type_arguments=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
cleanup.remove_unnecessary_array_creation=false
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=true
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
cleanup.remove_unused_method_parameters=false
cleanup.remove_unused_private_fields=true
cleanup.remove_unused_private_members=false
cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.return_expression=false
cleanup.simplify_lambda_expression_and_method_ref=false
cleanup.single_used_field=false
cleanup.sort_members=true
cleanup.sort_members_all=false
cleanup.standard_comparison=false
cleanup.static_inner_class=false
cleanup.strictly_equal_or_different=false
cleanup.stringbuffer_to_stringbuilder=false
cleanup.stringbuilder=false
cleanup.stringbuilder_for_local_vars=true
cleanup.stringconcat_stringbuffer_stringbuilder=false
cleanup.stringconcat_to_textblock=false
cleanup.substring=false
cleanup.switch=false
cleanup.system_property=false
cleanup.system_property_boolean=false
cleanup.system_property_file_encoding=false
cleanup.system_property_file_separator=false
cleanup.system_property_line_separator=false
cleanup.system_property_path_separator=false
cleanup.ternary_operator=false
cleanup.try_with_resource=false
cleanup.unlooped_while=false
cleanup.unreachable_block=false
cleanup.use_anonymous_class_creation=false
cleanup.use_autoboxing=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
cleanup.use_directly_map_method=false
cleanup.use_lambda=true
cleanup.use_parentheses_in_expressions=false
cleanup.use_string_is_blank=false
cleanup.use_this_for_non_static_field_access=true
cleanup.use_this_for_non_static_field_access_only_if_necessary=false
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
cleanup.use_unboxing=false
cleanup.use_var=false
cleanup.useless_continue=false
cleanup.useless_return=false
cleanup.valueof_rather_than_instantiation=false
cleanup_profile=_Devinsy-utils
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Devinsy-utils
formatter_settings_version=12
formatter_settings_version=23
jautodoc.cleanup.add_header=false
jautodoc.cleanup.javadoc=false
jautodoc.cleanup.replace_header=false
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false

View file

@ -2,6 +2,6 @@
<faceted-project>
<fixed facet="jst.java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.java" version="6.0"/>
<installed facet="jst.utility" version="1.0"/>
<installed facet="jst.java" version="17"/>
</faceted-project>

View file

@ -11,8 +11,8 @@ This software is released under the GNU LGPL.
## Requirements
- Java 1.6
- Eclipse Kepler
- Java 11
- Eclipse 4.16 (202006).
## Context
Several useful Java classes.

View file

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Wed Apr 19 22:56:10 CEST 2017
build.number=0
#Mon Nov 27 11:35:11 CET 2023
build.number=2

View file

@ -1,3 +1,3 @@
product.name=devinsy-utils
product.revision.major=0
product.revision.minor=4
product.revision.minor=17

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +1,12 @@
Description of used libraries:
- commons-lang: useful tools (StringUtils...)
- main:
- commons-lang: useful tools (StringUtils…)
- logs:
- log4j-api
- log4j-core
- log4j-slf4j-impl
- slf4j-api
- JUnit:
- hamcrest-core: required by junit
- joda-time: useful DateTime library
- junit: unit tests API
- log4j: log API
- slf4j-api: facade log API
- slf4j-log4j12: adaptation layer between slf4j and log4j

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +0,0 @@
Manifest-Version: 1.0
Class-Path:

View file

@ -30,9 +30,6 @@ import java.util.regex.Pattern;
*/
public class DateHelper
{
// static private final Logger logger =
// LoggerFactory.getLogger(DateHelper.class);
private static final String EUROPEAN_DATE_FORMAT = "%02d/%02d/%04d";
private static final String SHORT_EUROPEAN_DATE_FORMAT = "%02d/%02d";
private static final String RAW_DATE_FORMAT = "%04d%02d%02d";

View file

@ -25,9 +25,6 @@ import java.util.Calendar;
*/
public class DateTimeHelper
{
// static private final Logger logger =
// LoggerFactory.getLogger(DateTimeHelper.class);
private static final String EUROPEAN_DATE_FORMAT = "%02d/%02d/%04d %02d:%02d:%02d";
private static final String RAW_DATE_FORMAT = "%04d%02d%02d %02d:%02d:%02d";
private static final String ISO_DATE_FORMAT = "%04d-%02d-%02d %02d:%02d:%02d";

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2015,2017 Christian Pierre MOMON
* Copyright (C) 2008-2015,2017-2018 Christian Pierre MOMON
*
* This file is part of Devinsy-utils.
*
@ -31,9 +31,6 @@ import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import fr.devinsy.util.strings.StringList;
import fr.devinsy.util.strings.StringListUtils;
/**
* The Class FileTools.
*
@ -155,8 +152,7 @@ public class FileTools
* @param fileName
* the file name
* @return Extension value or null.
* @deprecated See
* <code>org.apache.commons.io.FilenameUtils.getExtension</code>
* @deprecated See <code>org.apache.commons.io.FilenameUtils.getExtension</code>
*/
@Deprecated
public static String getExtension(final String fileName)
@ -269,46 +265,6 @@ public class FileTools
return result;
}
/**
* Load string list.
*
* @param source
* the source
* @return the string list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static StringList loadStringList(final File source) throws IOException
{
StringList result;
result = loadStringList(source, DEFAULT_CHARSET_NAME);
//
return result;
}
/**
* Load string list.
*
* @param file
* the file
* @param charsetName
* the charset name
* @return the string list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static StringList loadStringList(final File file, final String charsetName) throws IOException
{
StringList result;
result = StringListUtils.load(file, charsetName);
//
return result;
}
/**
* Load to string buffer.
*
@ -384,122 +340,6 @@ public class FileTools
return result;
}
/**
* Load to string list.
*
* @param source
* the source
* @return the string list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static StringList loadToStringList(final File source) throws IOException
{
StringList result;
result = loadToStringList(source, DEFAULT_CHARSET_NAME);
//
return result;
}
/**
* Load to string list.
*
* @param file
* the file
* @param charsetName
* the charset name
* @return the string list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static StringList loadToStringList(final File file, final String charsetName) throws IOException
{
StringList result;
BufferedReader in = null;
try
{
in = new BufferedReader(new InputStreamReader(new FileInputStream(file), charsetName));
boolean ended = false;
final String LINE_SEPARATOR = System.getProperty("line.separator");
result = new StringList();
while (!ended)
{
String line = in.readLine();
if (line == null)
{
ended = true;
}
else
{
result.append(line).append(LINE_SEPARATOR);
}
}
}
finally
{
try
{
if (in != null)
{
in.close();
}
}
catch (IOException exception)
{
exception.printStackTrace();
}
}
//
return result;
}
/**
* Load to string list.
*
* @param source
* the source
* @return the string list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static StringList loadToStringList(final URL source) throws IOException
{
StringList result;
result = loadToStringList(source, DEFAULT_CHARSET_NAME);
//
return result;
}
/**
* Load to string list.
*
* @param source
* the source
* @param charsetName
* the charset name
* @return the string list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public static StringList loadToStringList(final URL source, final String charsetName) throws IOException
{
StringList result;
//
result = StringListUtils.load(source, charsetName);
//
return result;
}
/**
* Read.
*
@ -636,23 +476,6 @@ public class FileTools
save(file, source.toString());
}
/**
* Save.
*
* @param file
* the file
* @param source
* the source
* @throws UnsupportedEncodingException
* the unsupported encoding exception
* @throws FileNotFoundException
* the file not found exception
*/
public static void save(final File file, final StringList source) throws UnsupportedEncodingException, FileNotFoundException
{
StringListUtils.save(file, source);
}
/**
* Sets the extension.
*

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2008-2010,2013-2014,2017 Christian Pierre MOMON
* Copyright (C) 2008-2010,2013-2014,2017-2018 Christian Pierre MOMON
*
* This file is part of Devinsy-utils.
*
@ -24,8 +24,6 @@ import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import fr.devinsy.util.strings.StringList;
/**
* The Class ToolBox.
*
@ -257,60 +255,6 @@ public class ToolBox
return result;
}
/**
* Concatenates int values from an array, adding decoration strings.
*
* @param values
* Source of int values.
* @param prefix
* Decoration to put on start.
* @param separator
* Decoration to put between values.
* @param postfix
* Decoration to put on end.
*
* @return A decorated string representing the int values.
*/
public static String toString(final int[] values, final String prefix, final String separator, final String postfix)
{
String result;
StringList buffer = new StringList();
//
if (prefix != null)
{
buffer.append(prefix);
}
//
boolean firstPassed = false;
for (int value : values)
{
if (firstPassed)
{
buffer.append(separator);
}
else
{
firstPassed = true;
}
buffer.append(value);
}
//
if (postfix != null)
{
buffer.append(postfix);
}
//
result = buffer.toString();
//
return result;
}
/**
* To string.
*

View file

@ -1,316 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.util;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
/**
* The <code>ISO8601</code> utility class provides helper methods
* to deal with date/time formatting using a specific ISO8601-compliant
* format (see <a href="http://www.w3.org/TR/NOTE-datetime">ISO 8601</a>).
* <p/>
* The currently supported format is:
* <pre>
* &plusmn;YYYY-MM-DDThh:mm:ss.SSSTZD
* </pre>
* where:
* <pre>
* &plusmn;YYYY = four-digit year with optional sign where values <= 0 are
* denoting years BCE and values > 0 are denoting years CE,
* e.g. -0001 denotes the year 2 BCE, 0000 denotes the year 1 BCE,
* 0001 denotes the year 1 CE, and so on...
* MM = two-digit month (01=January, etc.)
* DD = two-digit day of month (01 through 31)
* hh = two digits of hour (00 through 23) (am/pm NOT allowed)
* mm = two digits of minute (00 through 59)
* ss = two digits of second (00 through 59)
* SSS = three digits of milliseconds (000 through 999)
* TZD = time zone designator, Z for Zulu (i.e. UTC) or an offset from UTC
* in the form of +hh:mm or -hh:mm
* </pre>
*/
public final class ISO8601 {
/**
* Parses an ISO8601-compliant date/time string.
*
* @param text the date/time string to be parsed
* @return a <code>Calendar</code>, or <code>null</code> if the input could
* not be parsed
* @throws IllegalArgumentException if a <code>null</code> argument is passed
*/
public static Calendar parse(String text) {
if (text == null) {
throw new IllegalArgumentException("argument can not be null");
}
// check optional leading sign
char sign;
int start;
if (text.startsWith("-")) {
sign = '-';
start = 1;
} else if (text.startsWith("+")) {
sign = '+';
start = 1;
} else {
sign = '+'; // no sign specified, implied '+'
start = 0;
}
/**
* the expected format of the remainder of the string is:
* YYYY-MM-DDThh:mm:ss.SSSTZD
*
* note that we cannot use java.text.SimpleDateFormat for
* parsing because it can't handle years <= 0 and TZD's
*/
int year, month, day, hour, min, sec, ms;
String tzID;
try {
// year (YYYY)
year = Integer.parseInt(text.substring(start, start + 4));
start += 4;
// delimiter '-'
if (text.charAt(start) != '-') {
return null;
}
start++;
// month (MM)
month = Integer.parseInt(text.substring(start, start + 2));
start += 2;
// delimiter '-'
if (text.charAt(start) != '-') {
return null;
}
start++;
// day (DD)
day = Integer.parseInt(text.substring(start, start + 2));
start += 2;
// delimiter 'T'
if (text.charAt(start) != 'T') {
return null;
}
start++;
// hour (hh)
hour = Integer.parseInt(text.substring(start, start + 2));
start += 2;
// delimiter ':'
if (text.charAt(start) != ':') {
return null;
}
start++;
// minute (mm)
min = Integer.parseInt(text.substring(start, start + 2));
start += 2;
// delimiter ':'
if (text.charAt(start) != ':') {
return null;
}
start++;
// second (ss)
sec = Integer.parseInt(text.substring(start, start + 2));
start += 2;
// delimiter '.'
if (text.charAt(start) != '.') {
return null;
}
start++;
// millisecond (SSS)
ms = Integer.parseInt(text.substring(start, start + 3));
start += 3;
// time zone designator (Z or +00:00 or -00:00)
if (text.charAt(start) == '+' || text.charAt(start) == '-') {
// offset to UTC specified in the format +00:00/-00:00
tzID = "GMT" + text.substring(start);
} else if (text.substring(start).equals("Z")) {
tzID = "GMT";
} else {
// invalid time zone designator
return null;
}
} catch (IndexOutOfBoundsException e) {
return null;
} catch (NumberFormatException e) {
return null;
}
TimeZone tz = TimeZone.getTimeZone(tzID);
// verify id of returned time zone (getTimeZone defaults to "GMT")
if (!tz.getID().equals(tzID)) {
// invalid time zone
return null;
}
// initialize Calendar object
Calendar cal = Calendar.getInstance(tz);
cal.setLenient(false);
// year and era
if (sign == '-' || year == 0) {
// not CE, need to set era (BCE) and adjust year
cal.set(Calendar.YEAR, year + 1);
cal.set(Calendar.ERA, GregorianCalendar.BC);
} else {
cal.set(Calendar.YEAR, year);
cal.set(Calendar.ERA, GregorianCalendar.AD);
}
// month (0-based!)
cal.set(Calendar.MONTH, month - 1);
// day of month
cal.set(Calendar.DAY_OF_MONTH, day);
// hour
cal.set(Calendar.HOUR_OF_DAY, hour);
// minute
cal.set(Calendar.MINUTE, min);
// second
cal.set(Calendar.SECOND, sec);
// millisecond
cal.set(Calendar.MILLISECOND, ms);
try {
/**
* the following call will trigger an IllegalArgumentException
* if any of the set values are illegal or out of range
*/
cal.getTime();
/**
* in addition check the validity of the year
*/
getYear(cal);
} catch (IllegalArgumentException e) {
return null;
}
return cal;
}
/**
* Formats a <code>Calendar</code> value into an ISO8601-compliant
* date/time string.
*
* @param cal the time value to be formatted into a date/time string.
* @return the formatted date/time string.
* @throws IllegalArgumentException if a <code>null</code> argument is passed
* or the calendar cannot be represented as defined by ISO 8601 (i.e. year
* with more than four digits).
*/
public static String format(Calendar cal) throws IllegalArgumentException {
if (cal == null) {
throw new IllegalArgumentException("argument can not be null");
}
/**
* the format of the date/time string is:
* YYYY-MM-DDThh:mm:ss.SSSTZD
*
* note that we cannot use java.text.SimpleDateFormat for
* formatting because it can't handle years <= 0 and TZD's
*/
StringBuffer buf = new StringBuffer();
// year ([-]YYYY)
appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');
// month (MM)
appendZeroPaddedInt(buf, cal.get(Calendar.MONTH) + 1, 2);
buf.append('-');
// day (DD)
appendZeroPaddedInt(buf, cal.get(Calendar.DAY_OF_MONTH), 2);
buf.append('T');
// hour (hh)
appendZeroPaddedInt(buf, cal.get(Calendar.HOUR_OF_DAY), 2);
buf.append(':');
// minute (mm)
appendZeroPaddedInt(buf, cal.get(Calendar.MINUTE), 2);
buf.append(':');
// second (ss)
appendZeroPaddedInt(buf, cal.get(Calendar.SECOND), 2);
buf.append('.');
// millisecond (SSS)
appendZeroPaddedInt(buf, cal.get(Calendar.MILLISECOND), 3);
// time zone designator (Z or +00:00 or -00:00)
TimeZone tz = cal.getTimeZone();
// determine offset of timezone from UTC (incl. daylight saving)
int offset = tz.getOffset(cal.getTimeInMillis());
if (offset != 0) {
int hours = Math.abs((offset / (60 * 1000)) / 60);
int minutes = Math.abs((offset / (60 * 1000)) % 60);
buf.append(offset < 0 ? '-' : '+');
appendZeroPaddedInt(buf, hours, 2);
buf.append(':');
appendZeroPaddedInt(buf, minutes, 2);
} else {
buf.append('Z');
}
return buf.toString();
}
/**
* Returns the astronomical year of the given calendar.
*
* @param cal a calendar instance.
* @return the astronomical year.
* @throws IllegalArgumentException if calendar cannot be represented as
* defined by ISO 8601 (i.e. year with more
* than four digits).
*/
public static int getYear(Calendar cal) throws IllegalArgumentException {
// determine era and adjust year if necessary
int year = cal.get(Calendar.YEAR);
if (cal.isSet(Calendar.ERA)
&& cal.get(Calendar.ERA) == GregorianCalendar.BC) {
/**
* calculate year using astronomical system:
* year n BCE => astronomical year -n + 1
*/
year = 0 - year + 1;
}
if (year > 9999 || year < -9999) {
throw new IllegalArgumentException("Calendar has more than four " +
"year digits, cannot be formatted as ISO8601: " + year);
}
return year;
}
/**
* Appends a zero-padded number to the given string buffer.
* <p/>
* This is an internal helper method which doesn't perform any
* validation on the given arguments.
*
* @param buf String buffer to append to
* @param n number to append
* @param precision number of digits to append
*/
private static void appendZeroPaddedInt(StringBuffer buf, int n, int precision) {
if (n < 0) {
buf.append('-');
n = -n;
}
for (int exp = precision - 1; exp > 0; exp--) {
if (n < Math.pow(10, exp)) {
buf.append('0');
} else {
break;
}
}
buf.append(n);
}
}

View file

@ -1 +0,0 @@
Extract from jackrabbit-2.1.1-src.zip

View file

@ -1,5 +1,6 @@
/*
* Copyright (C) 2013,2017 Christian Pierre MOMON
* Copyright (C) 2013-2023 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of Devinsy-utils.
*
@ -18,8 +19,9 @@
*/
import java.io.File;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.PatternLayout;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -35,15 +37,17 @@ public class FileIteratorSandbox
static
{
// Initialize logger.
org.apache.log4j.BasicConfigurator.configure();
org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.DEBUG);
Configurator.initialize(new DefaultConfiguration());
Configurator.setRootLevel(Level.DEBUG);
logger = LoggerFactory.getLogger(FileIteratorSandbox.class);
//
org.apache.log4j.Logger defaultLogger = org.apache.log4j.Logger.getRootLogger();
defaultLogger.removeAllAppenders();
defaultLogger.addAppender(new ConsoleAppender(new PatternLayout("%d{ISO8601} - dutils [%-5p] %34.34c.%-25M - %m%n")));
// org.apache.log4j.Logger defaultLogger =
// org.apache.log4j.Logger.getRootLogger();
// defaultLogger.removeAllAppenders();
// defaultLogger.addAppender(new ConsoleAppender(new
// PatternLayout("%d{ISO8601} - dutils [%-5p] %34.34c.%-25M - %m%n")));
//
logger.debug("Log initialized.");

1
test/TestTree/P Symbolic link
View file

@ -0,0 +1 @@
20081111-nouvelle_voiture

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 19 B

1
test/TestTree/xine.jpg Symbolic link
View file

@ -0,0 +1 @@
xine_snapshot-4.jpg

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 19 B

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2014,2017 Christian Pierre MOMON
* Copyright (C) 2014-2023 Christian Pierre MOMON <christian@momon.org>
*
* This file is part of Devinsy-utils.
*
@ -18,17 +18,13 @@
*/
package fr.devinsy.util;
import java.io.IOException;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import fr.devinsy.util.strings.StringList;
/**
* The Class FileToolsTest.
*
@ -37,7 +33,7 @@ import fr.devinsy.util.strings.StringList;
public class FileToolsTest
{
public final org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(FileToolsTest.class);
private static final org.apache.logging.log4j.Logger logger = org.apache.logging.log4j.LogManager.getLogger(FileToolsTest.class);
/**
* Before.
@ -45,30 +41,151 @@ public class FileToolsTest
@Before
public void before()
{
BasicConfigurator.configure();
Logger.getRootLogger().setLevel(Level.ERROR);
Configurator.initialize(new DefaultConfiguration());
Configurator.setRootLevel(Level.INFO);
}
/**
* Load to string list URL 01.
*
* @throws IOException
* Signals that an I/O exception has occurred.
* Test add before extension 01.
*/
public void testAddBeforeExtension01()
{
String source = null;
String target = FileTools.addBeforeExtension(source, null);
Assert.assertNull(target);
}
/**
* Test add before extension 02.
*/
@Test
public void loadToStringListURL01() throws IOException
public void testAddBeforeExtension02()
{
//
this.logger.debug("===== test starting...");
//
StringList source = FileTools.loadToStringList(FileTools.class.getResource("/fr/devinsy/util/lines.txt"));
String source = null;
//
Assert.assertEquals(4, source.size());
Assert.assertEquals("trois", source.get(3 - 1));
String target = FileTools.addBeforeExtension(source, "");
Assert.assertNull(target);
}
//
this.logger.debug("===== test done.");
/**
* Test add before extension 03.
*/
@Test
public void testAddBeforeExtension03()
{
String source = null;
String target = FileTools.addBeforeExtension(source, "-fr");
Assert.assertNull(target);
}
/**
* Test add before extension 05.
*/
@Test
public void testAddBeforeExtension05()
{
String source = "";
String target = FileTools.addBeforeExtension(source, null);
Assert.assertEquals(target, "");
}
/**
* Test add before extension 06.
*/
@Test
public void testAddBeforeExtension06()
{
String source = "";
String target = FileTools.addBeforeExtension(source, "");
Assert.assertEquals(target, "");
}
/**
* Test add before extension 07.
*/
@Test
public void testAddBeforeExtension07()
{
String source = "";
String target = FileTools.addBeforeExtension(source, "-fr");
Assert.assertEquals(target, "-fr");
}
/**
* Test add before extension 08.
*/
@Test
public void testAddBeforeExtension08()
{
String source = "foo";
String target = FileTools.addBeforeExtension(source, null);
Assert.assertEquals(target, "foo");
}
/**
* Test add before extension 09.
*/
@Test
public void testAddBeforeExtension09()
{
String source = "foo";
String target = FileTools.addBeforeExtension(source, "");
Assert.assertEquals(target, "foo");
}
/**
* Test add before extension 10.
*/
@Test
public void testAddBeforeExtension10()
{
String source = "foo";
String target = FileTools.addBeforeExtension(source, "-fr");
Assert.assertEquals(target, "foo-fr");
}
/**
* Test add before extension 11.
*/
@Test
public void testAddBeforeExtension11()
{
String source = "foo.txt";
String target = FileTools.addBeforeExtension(source, null);
Assert.assertEquals(target, "foo.txt");
}
/**
* Test add before extension 12.
*/
@Test
public void testAddBeforeExtension12()
{
String source = "foo.txt";
String target = FileTools.addBeforeExtension(source, "");
Assert.assertEquals(target, "foo.txt");
}
/**
* Test add before extension 13.
*/
@Test
public void testAddBeforeExtension13()
{
String source = "foo.txt";
String target = FileTools.addBeforeExtension(source, "-fr");
Assert.assertEquals(target, "foo-fr.txt");
}
/**
@ -77,16 +194,13 @@ public class FileToolsTest
@Test
public void testGetExtension()
{
//
this.logger.debug("===== test starting...");
logger.debug("===== test starting...");
//
String extension = FileTools.getExtension("test.ext");
//
Assert.assertEquals(extension, "ext");
//
this.logger.debug("===== test done.");
logger.debug("===== test done.");
}
}