⬇️Package ch.k43.util
Last updated
Last updated
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
KLog: Fix small bug when debug log is active in YAML code
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
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
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
Upgrade Notice: Make sure you are using the new Jakarta/Angus mail jar files for the KSMTPMailer and KLogSMTPHandler classes (see Jakarta/Angus Mail)
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
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
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
Some minor code and documentation changes
Added architecture overview diagramm for KSocketServer
K: added round(), compressZLIB() and decompressZLIB()
Some minor code and documentation changes
Implemented Java AutoCloseable in KDB, KSocketClient, KSocketServer, KSocketServerListener and KSocketServerThread
K: Added isNumber()
K: Added option to encodeJSON() to return null, boolean and number values without quotes
Some minor code and documentation changes
Upgrade Notice: The K.getJVMMemStats() now returns number of bytes (not KB).
K: Added formatBytes(), updated getJVMMemStats() to return number of bytes
KDB: Added setAutoCommit() and getElapsedTime()
Some minor code and documentation changes
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
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
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
Upgrade Notice: Don't forget to rename Log.properties to KLog.properties if you are using the KLog framework.
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
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()
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
KSMTPMailer: Added check for hostname (TLS only)
Added some sample code to this website
Some minor code and document changes
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
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
First public version