Category: Introducing JDK 17 easy filter creation

Introducing the Skip List data structure – Arrays, collections and data structuresIntroducing the Skip List data structure – Arrays, collections and data structures

113. Introducing the Skip List data structure The Skip List data structure is a probabilistic data structure built on top of a linked list. A Skip List uses an underlying [...]

Introducing the Zipper data structure 2 – Arrays, collections and data structuresIntroducing the Zipper data structure 2 – Arrays, collections and data structures

The remaining code handles the initialization of children in a lazy fashion (on demand):   @Override  public Collection<? extends Zippable> getChildren() {    lazyGetChildren();    return (children != null) ?      new LinkedList<>(Arrays.asList(children)) [...]

Introducing the Splay Tree data structure – Arrays, collections and data structuresIntroducing the Splay Tree data structure – Arrays, collections and data structures

120. Introducing the Splay Tree data structure A Splay Tree is a flavor of Binary Search Tree (BST). Its particularity consists of the fact that it is a self-balancing tree [...]

Serializing objects to byte arrays – Java I/O: Context-Specific Deserialization FiltersSerializing objects to byte arrays – Java I/O: Context-Specific Deserialization Filters

124. Serializing objects to byte arrays In chapter 4, Problem X, we talked about the serialization/deserialization of Java records, so you should be pretty familiar with these operations. In a [...]

Serializing objects to XML – Java I/O: Context-Specific Deserialization FiltersSerializing objects to XML – Java I/O: Context-Specific Deserialization Filters

126. Serializing objects to XML Serializing/deserializing objects to XML via the JDK API can be accomplished via java.beans.XMLEncoder, respectively XMLDecoder. The XMLEncoder API relies on Java Reflection to discover the [...]

Implementing a custom pattern-based ObjectInputFilter – Java I/O: Context-Specific Deserialization FiltersImplementing a custom pattern-based ObjectInputFilter – Java I/O: Context-Specific Deserialization Filters

128. Implementing a custom pattern-based ObjectInputFilter Let’s assume that we already have the Melon class and the helper methods for serializing/deserializing objects to/from byte arrays from Problem 124.Creating a pattern-based [...]

Introducing JDK 17 easy filter creation – Java I/O: Context-Specific Deserialization FiltersIntroducing JDK 17 easy filter creation – Java I/O: Context-Specific Deserialization Filters

134. Introducing JDK 17 easy filter creation Starting with JDK 17, we can express filters more intuitively and readable via two convenient methods named allowFilter() and rejectFilter(). And, since the [...]

Tackling context-specific deserialization filters – Java I/O: Context-Specific Deserialization FiltersTackling context-specific deserialization filters – Java I/O: Context-Specific Deserialization Filters

135. Tackling context-specific deserialization filters JDK 17 enriched the deserialization filter capabilities with the implementation of JEP 415, Context-Specific Deserialization Filters.Practically, JDK 17 added the so-called Filter Factories. Depending on [...]

Monitoring Deserialization via JFR – Java I/O: Context-Specific Deserialization FiltersMonitoring Deserialization via JFR – Java I/O: Context-Specific Deserialization Filters

136. Monitoring Deserialization via JFR JFR stands for Java Flight Recorder and it is an event-based tool for diagnosis and profiling Java applications. This tool was initially added in JDK [...]