> For the complete documentation index, see [llms.txt](https://java-util.k43.ch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://java-util.k43.ch/downloads/package-ch-k43-util.md).

# Download Package

<details>

<summary>Planned for next version</summary>

* **KQueue**: Removed *setMode()* and *getMode*() to avoid concurrency problems
* Some minor code and documentation changes

</details>

## Current Version 2025.09.15

{% file src="/files/k0xyLJA2GGd8LerQ5JSl" %}

* **KQueue:** New class to support named LIFO/LIFO queues
* **K**: added *writeConsole()*, fixed formatting bug in *getTimeISO8601(Calendar)*, added more object types in *isEmpty()*
* Some minor code and documentation changes

#### Version 2025.09.02

{% file src="/files/qSVRojom0muVByKRrCs8" %}

* **KCmdArgParser:** new class to parse and retrieve command line arguments
* **K**: Added *isValidHostName(), readConsole(), isMinimumVersion(),* internal optimization in timer methods
* Some minor code and documentation changes

#### Version 2025.06.05

{% file src="/files/jU730kB4xlQe7LvaQPDR" %}

* **K**: Added *concat(), clear(), hexToBytes()*
* **KTimer**: Added *getElapsedNanoseconds()*
* Some minor code and documentation changes

#### Version 2025.05.17

{% file src="/files/Ug8lYTsADrGZ55tQa07N" %}

* **KPasswordVault:** New class to securely hash, store and verify passwords
* **KSMTPMailer**: Added *setLocalFQDNHostName()*
* Updated Sample Code
* Some minor code and documentation changes

#### Version 2025.04.26

{% file src="/files/8moaxaErGr3lUuz6Z2qT" %}

* **K**: Added *repeat(), truncateMiddle(), compressGZIP(), decompressGZIP()*
* Some minor code and documentation changes

#### Version 2025.04.13

{% file src="/files/iIwFbuAHGelAMWBnIblP" %}

* **KHTTPServerThread**: new Class to support HTTP server applications (for web or REST services)
* **K**: Added *getHTTPStatusText()* to return text for a given HTTP status code
* Updated Sample Code
* Some minor code and documentation changes

***

#### Version 2025.03.30

{% file src="/files/Izqezs2J5MN4BrZTjAtj" %}

* **K**: Enhance *toPEM()* to format certificate chain of public keys and add option to describe objects in comments
* Added sample GraalVM macOS native image executable "GetCurrentVersion" in [Tips / FAQ](/examples/tips-faq.md)
* Some minor code and documentation changes

***

#### Version 2025.03.20

{% file src="/files/mUgm8Cwvpl7VpHjgWvMN" %}

* **K**: Added *loadKeyStore()*, *toPEM()*, *generateRSAKeyPair()*, *encodeHTML()* and *decodeHTML()*
* Updated sample code
* Some minor code and documentation changes

#### Version 2025.03.02

{% file src="/files/wTRdv1YsBd7rgiALq947" %}

* **K:** Added *INSTANCE\_UUID* to identify running application instance
* **KLog**: Added options in *KLog.properties* and application startup parameters (*KLogInclude and KLogExclude)* to include or exclude data from logging
* Some minor code and documentation changes

#### Version 2025.02.26

{% file src="/files/HwuLQC4vX4oXrjhHoTeb" %}

* Publish Java code on GitHub as open source
* **K**: Added *getCurrentVersionNumber()*
* Some minor code and documentation changes

#### Version 2025.02.19

{% file src="/files/MTONX9tXiw6osIODjNGL" %}

* **K**: Added *getPasswordHash*()
* Added HelloWorld example to test installation with *java -jar ch.k43.util.jar*
* Some minor code and documentation changes

#### Version 2025.02.13

{% file src="/files/JZvxcl7EcdINBVXItaY8" %}

* **KTimer**: Added *reset()*
* **K:** Added *saveError()*
* **K**: Added multiple static fields that describe the environment
* Updated [sample code](/downloads/sample-code.md)
* Some minor code and documentation changes

#### Version 2025.01.27

{% file src="/files/DOHK4XqGwHFNyZsXWL38" %}

* **KHTTPClient**: Added *setTimeOutSec()*
* **KLog**: Added command line parameter *KLogPropertyFile* to override name and location of KLog.properties file
* **KLog**: Added command line parameter *KLogLevel* to override logging level (*INFO*, *ERROR*, *DEBUG* or *OFF*)
* Changed locale of generated JavaDoc output to en\_US
* Some minor code and documentation changes

#### Version 2025.01.22

{% file src="/files/54sMJXjixIt7WWE2iB3m" %}

* **K**: Added *replaceParams()*
* **KHTTPClient**: Treat HTTP return code 200-299 as successful
* **KLog**: Added parameterized logging to all methods, e.g.\
  \&#xNAN;*KLog.error("API call failed - Return code {}", returnCode)*
* Internal code optimization and documentation changes

#### Version 2025.01.19

{% file src="/files/RwlzHgjD1nhqNmltcaH0" %}

* Support for GraalVM native-image compilation (see Tips / FAQ)
* Check if JVM is Java 8 (version 1.8) or higher
* K: Added isNewVersionAvailable()
* Some minor code changes
* Major rewrite of the website content

#### Version 2024.12.08

{% file src="/files/E2MYzZFZsF2BBwY4z2tZ" %}

* **KLog**: Save the last 10 errors even if logging is not active (retrievable with *K.getLastError*() and *K.getLastErrors*()
* **K**: Changed *formatBytes*() to show e.g. MiB instead of MB (IEC standard)
* **K**: Added *getPrivateKey*(), *getPublicKey*() and *getCertificate*()
* Sample code updated
* Some minor code and documentation changes

#### Version 2024.10.26

{% file src="/files/v5OrrUXKZhjrJlgiERiz" %}

* **KDB**: Added option *argTimeOutSec* to exec()
* **KDB**: Added *prepare*() and *execPrepare*() to support SQL precompilation and prevent SQL injection attacks
* Some minor code and documentation changes

#### Version 2024.09.15

{% file src="/files/df3NS7fpSEuz5Qai60IC" %}

* **KLog**: Fix small bug when debug log is active in YAML code

#### Version 2024.09.14

{% file src="/files/E14W8GrzJok7ao7nsgGd" %}

* **KLog**: Added formatter class to write logging as YAML output
* **KDB**: Added *getDataAsYAML*() to output result set as YAML string
* **K**: Added *encodeYAML*() and *decodeYAML*()
* Some minor code and documentation changes

#### Version 2024.09.12

{% file src="/files/akD1ANY1PJ5hbVqEbOvh" %}

* **K**: Added option to *isNumber*() to check for allowed numeric range
* **KLog**: Show CPU count and OS disk size in debug log
* Some minor code and documentation changes

#### Version 2024.09.06

{% file src="/files/g7SC65LEysZx5psZkdaK" %}

* **KThread**: New class for easy Java thread creation and termination
* **K**: Removed *argForce* argument from *stopThread*() as newer Java versions removed the depreciated *Thread.stop*() method

#### Version 2024.09.02

{% file src="/files/onFwCw2nbWJppHRj1pwy" %}

{% hint style="info" %}
**Upgrade Notice**: Make sure you are using the new Jakarta/Angus mail jar files for the *KSMTPMailer* and *KLogSMTPHandler* classes
{% endhint %}

* **KSMTPMailer:** Migrated from JavaMail (javax.mail) to Eclipse Jakarta/Angus mail.
* **KDB**: Added option in *getDataAsTable*() to optionally print column headers
* Some minor code and documentation changes

#### Version 2024.08.29

{% file src="/files/OiqJra6qsnPWKzXrFVQg" %}

* **K**: Added *isInteger*() and *stopThread*()
* **KLogSMTPHandler**: Added logging handler to send error log entries (FATAL log level) to any SMTP server
* Some minor code and documentation changes

#### Version 2024.08.24

{% file src="/files/UdGpchs8evqQA9O59JPy" %}

* **K**: Remove SHA-1 algorithm from *generateHash()*
* **K**: Added *serialize*() and *deserialize*()
* **KDB**: Added maxRows argument to *exec()* call
* Added *toString*() to all classes to write out object data
* Updated [sample code](/downloads/sample-code.md)
* Some minor code and documentation changes

#### Version 2024.08.12

{% file src="/files/hqOYeCCe1QEPwzwTWQ2D" %}

* Added [architecture overview diagramm](/examples/http-socket-server.md) for *KSocketServer*
* **K**: added *round()*, *compressZLIB()* and *decompressZLIB()*
* Some minor code and documentation changes

#### Version 2024.07.07

{% file src="/files/BlRwSEggG8y7ZnWZhIz4" %}

* Implemented Java AutoCloseable in **KDB**, **KSocketClient**, **KSocketServer**, **KSocketServerListener** and **KSocketServerThread**&#x20;
* **K**: Added *isNumber()*
* **K**: Added option to *encodeJSON()* to return null, boolean and number values without quotes
* Some minor code and documentation changes

#### Version 2024.06.27

{% file src="/files/arc9nTA281edi2jTjLie" %}

{% hint style="info" %}
**Upgrade Notice**: The *K.getJVMMemStats()* now returns number of bytes (not KB).
{% endhint %}

* **K**: Added *formatBytes()*, updated *getJVMMemStats()* to return number of bytes
* **KDB**: Added *setAutoCommit()* and *getElapsedTime()*
* Some minor code and documentation changes

#### Version 2024.06.22

{% file src="/files/BQnSmPUasgRUXVL11nM5" %}

* **KLog**: New formatter classes to write logging as CSV or XML output
* **KLog**: Adds UUID field to JSON, CSV, XML and JDBC output
* New KLog.properties sample file uploaded
* Some minor code and documentation changes

#### Version 2024.06.20

{% file src="/files/lX375fXiDI9bZVkwisbn" %}

* **K:** Added encode and decode methods for XML
* **KLogJDBCHandler**: Added logging handler to output data to any JDBC compliant database
* **KLog**: Added *getLevel()* and *setLevel()*
* **KDB**: Added *getDataAsXML()*, *commit()* and *rollback()*
* **KSMTPMailer**: Added *setUnsubscribe()*
* New KLog.properties sample file uploaded
* Some minor code and documentation changes

#### Version 2024.06.15

{% file src="/files/xx061fW6RNL3qvJkOVFh" %}

* **KDB**: New class to support JDBC compliant databases with various output formats (JSON, CSV, table or Java objects)
* **KSMTPMailer**: Added *setSubject(string, charset)* for non-UTF-8 subjects
* **KSMTPMailer**: Added *setOAuth2Authentication()* to support OAuth 2.0 authentication
* **K**: Added encode and decode methods for JSON and CSV
* Some minor code and documentation changes

#### Version 2024.06.10

{% file src="/files/w7NbHL2vkVwGgMFwdJOK" %}

{% hint style="info" %}
**Upgrade Notice:** Don't forget to rename Log.properties to *KLog.properties* if you are using the KLog framework.
{% endhint %}

* **KLog**: Log.properties file renamed to *KLog.properties* for consistency with the KLog class
* **K**: Added *runGC()* and *getJVMMemStats()*
* **KSMTPMailer**: Added *addText(string, charset)* for non-UTF-8 text parts
* Include downloads of Jakarta Mail and Jakarta Activation on this website
* Some minor code and document changes

#### Version 2024.06.06

{% file src="/files/dVvSPCudPPVSjwo8Qkci" %}

* **KLog**: Added *setLevelXxx()*, *isLevelXxx()* and *resetLevel()* to set or query the configured logging level during runtime
* **KSMTPMailer**: Added *getMessageSize()* to get size of MIME message after delivery
* **KSMTPMailer**: Include Jakarta Mail debug log in KLog logging output
* **KSMTPMailer**: Removed *X-TLS-Connection* header as there is no guarantee that it is enforced by the SMTP server
* **KTimer**: Added *getStartTime()* and *toString()* to return start time as Calendar object or in ISO-8601 format
* **KSocketServerThread**: Added *writeLine()*
* **K**: Added *getRandomInt()*, *getUTCOffsetMin()* and *getUTCOffsetAsString()*

#### Version 2024.05.24

{% file src="/files/eR0dFmmUI8r6So3fCoGi" %}

* **K**: Added *toHex()* to format byte array or string to a hexadecimal string
* **K**: Added *getUniqueID()* to return unique id (UUID)
* **K**: Added *getCurrentDir()* to return current directory
* **K**: Changed *generateHash()* to support SHA3-256, SHA3-384 ad SHA3-512
* **K**: Added getStartTime() to return date and time of application startup
* **KHTTPClient**: Added *put()*, *patch(),* options() and *delete()* methods&#x20;
* **KSMTPMailer**: Added check for hostname (TLS only)
* Added some [sample code](/downloads/sample-code.md) to this website
* Some minor code and document changes

#### Version 2024.05.20

{% file src="/files/LVnJuiR7ETKnuZMoJHVn" %}

* **K**: Added *isEmpty()* to test string or array for emptiness
* **KSMTPMailer**: Include platform in *X-Mailer* header
* **KSMTPMailer**: Added header *X-TLS-Connnection: true/false*
* Some code cleanup and documentation changes

#### Version 2024.05.17

{% file src="/files/NuG0uRn2yP6ik7Gt9wD7" %}

* **KSMTPMailer:** New class to compose and send multipart SMTP email with text, HTML and file attachments
* **KSocketServerThread:** Added getAuthenthicatedClientCN() to return  common name of the full distinguished name
* **KSocketClient:** Added getAuthenticatedClient() and  getAuthenticatedClientCN()
* **KFile**: Added readPropertiesFile() and writePropertiesFile()
* **KLog:** Added argException() to throw IllegalArgumentException if expression evaluates true
* **K:** Added dnsQuery() to return records for all query types (MX, A, etc)
* Some minor code and documentation changes

#### Version 2024.05.06

{% file src="/files/IAoHOU0Ox5opC9czOYSF" %}

* First public version
