ITEXT PDF / CATATAN</>↗iText PDF21 Jan 2024
iText 8 is an open source library for creating and manipulating PDF files in Java. It’s a successor to iText 7, providing more advanced features and capabilities for transforming documents into PDF format. iText 8 supports the creation and manipulation of PDF documents, and offers various functionalities to enhance your PDF generation requirements. With iText […]
UTIL PACKAGE / CATATAN</>↗Util Package21 Jan 2024
Base64 encoding scheme is designed to encode binary data, especially when that data needs to be stored and transferred over media that designed to deal with text. Base64 encoding helps to ensure that the data remains intact without modification during transport. Base64 is a group of similar binary-to-text encoding schemes that represent binary data in […]
UTIL PACKAGE / CATATAN</>↗Util Package20 Jan 2024
The java.util.Base64.getEncoder() and java.util.Base64.getUrlEncoder() methods in Java both return a Base64 encoder. However, they exhibit different behaviors mainly due to the encoding scheme they follow for handling URL and filename safe characters. java.util.Base64.getEncoder(): This method returns a Base64.Encoder that encodes using the Basic type base64 encoding scheme as per RFC 4648 Section 4. Basic Base64 […]
JAVA 8 / CATATAN</>↗Java 820 Jan 2024
You can use the atStartOfDay() method from LocalDate class to convert a LocalDate into a LocalDateTime. Then, you need to convert LocalDateTime to a ZonedDateTime using the atZone() method. Here is an example: package org.kodejava.datetime; import java.time.*; public class LocalDateToZonedDateTimeExample { public static void main(String[] args) { // Create a LocalDate LocalDate date = LocalDate.of(2023, […]
JAVA 8 / CATATAN</>↗Java 820 Jan 2024
The ZonedDateTime class is part of the Java Date-Time Package (java.time.*), released in Java 8 to address the shortcomings of the old date-time classes such as java.util.Date, java.util.Calendar, and java.util.SimpleDateFormat. Some of the key features are: It represents a date-time with a timezone in the ISO-8601 calendar system, such as ‘2007-12-03T10:15:30+01:00 Europe/Paris’. It provides a […]
JAVA 8 / CATATAN</>↗Java 819 Jan 2024
The ZoneRules class in Java’s Date-Time API is used to encapsulate the set of rules defining how the zone offset varies for a single time zone. The information in this class is typically derived from the IANA Time Zone Database (TZDB). The rules model the data traditionally contained in the ‘zic’ compiled data files of […]