java-io-util is a Java library providing common, well-tested I/O utilities. It offers type-safe abstractions for parsing and formatting data across multiple formats (text, XML, CSV, HTTP), functional I/O interfaces, and platform-specific helpers.
Key capabilities:
- Type-safe
FileParser/FileFormatterandTextParser/TextFormatterinterfaces for stream-based and character-based I/O - Functional I/O interfaces (
IOFunction,IOSupplier,IOConsumer,IOPredicate, …) mirroringjava.util.functionwithIOExceptionsupport - Text parsing/formatting with
Parser/Formatter(null-safeCharSequenceconversion) and typedPropertyaccessors - XML parsing (SAX, StAX) and formatting with secure defaults
- JAXB marshalling/unmarshalling integration
- CSV reading/writing via picocsv
- Lightweight HTTP client abstraction over
HttpURLConnection - curl-backed
HttpURLConnectionimplementation for environments without native HTTP - Windows-specific process wrappers (registry, PowerShell, CScript, where)
- Licensed under EUPL; maintained by the National Bank of Belgium
The project is a Maven multi-module build with a layered dependency structure:
Foundation module with zero external runtime dependencies. All other modules depend on this.
- I/O interfaces:
FileParser,FileFormatter(stream-based),TextParser,TextFormatter(character-based) - Functional I/O:
IOFunction,IOSupplier,IOConsumer,IOPredicate,IORunnable,IOUnaryOperator,IOBiConsumer - Text utilities:
Parser,Formatter(null-safeCharSequenceconversion),Property,BooleanProperty,IntProperty,LongProperty,DoubleProperty - Other:
Resource,IOIterator,MediaType,ProcessReader,OS,SystemProperties,Zip,Properties2,BlockSizer
| Module | Depends on | Purpose |
|---|---|---|
java-io-xml |
base |
XML parsing/formatting via SAX (Sax) and StAX (Stax) with secure defaults; Xml facade |
java-io-xml-bind |
xml |
JAXB marshalling/unmarshalling (Jaxb) bridging javax.xml.bind to FileParser/FileFormatter |
java-io-picocsv |
base |
CSV parsing/formatting (Picocsv) via the picocsv library |
| Module | Depends on | Purpose |
|---|---|---|
java-io-http |
base |
Lightweight HTTP client abstraction: HttpClient, HttpRequest, HttpResponse, HttpAuthenticator, URLQueryBuilder, URLConnectionFactory |
java-io-curl |
base |
curl-backed HttpURLConnection implementation (CurlHttpURLConnection) for proxy/TLS scenarios |
| Module | Depends on | Purpose |
|---|---|---|
java-io-win |
base |
Windows-specific wrappers: RegWrapper, PowerShellWrapper, CScriptWrapper, WhereWrapper |
| Module | Purpose |
|---|---|
java-io-bom |
Maven Bill of Materials for version alignment |
mvn clean install # full build + tests + enforcer checks
mvn clean install -Pyolo # skip all checks (fast local iteration)
mvn test -pl <module-name> -Pyolo # fast test a single module
mvn test -pl <module-name> -am # full test a single module- Java 8 target with JPMS
module-info.javacompiled separately on JDK 9+ (seejava8-with-jpmsprofile in root POM) - JUnit 5 with parallel execution enabled (
junit.jupiter.execution.parallel.enabled=true); AssertJ for assertions
- Lombok: use lombok annotations when possible. Config in
lombok.config:addNullAnnotations=jspecify,builder.className=Builder - Nullability:
@org.jspecify.annotations.Nullablefor nullable;@lombok.NonNullfor non-null parameters. Return types use@Nullableor theOrNullsuffix (e.g.,getThingOrNull) - Design annotations use annotations from
java-design-utilsuch as@VisibleForTesting,@StaticFactoryMethod,@DirectImpl,@MightBeGenerated,@MightBePromoted - Internal packages:
internal.<project>.*are implementation details; public API lives in the root andspipackages - Static analysis:
forbiddenapis(nojdk-unsafe,jdk-deprecated,jdk-internal,jdk-non-portable,jdk-reflection),modernizer - Reproducible builds:
project.build.outputTimestampis set in the root POM - Formatting/style:
- Use IntelliJ IDEA default code style for Java
- Follow existing formatting and match naming conventions exactly
- Follow the principles of "Effective Java"
- Follow the principles of "Clean Code"
- Java/JVM:
- Target version defined in root POM properties; some modules may require higher versions
- Use modern Java feature compatible with defined version
- Do respect existing architecture, coding style, and conventions
- Do prefer minimal, reviewable changes
- Do preserve backward compatibility
- Do not introduce new dependencies without justification
- Do not rewrite large sections for cleanliness
- Do not reformat code
- Do not propose additional features or changes beyond the scope of the task