Problems
Use the following problems to test your programming prowess on Java serialization/deserialization. I strongly encourage you to give each problem a try before you turn to the solutions and download the example programs:
- Serializing objects to byte arrays: Write a Java application that exposes two helper methods for serializing/deserializing objects to/from
byte[]
. - Serializing objects to strings: Write a Java application that exposes two helper methods for serializing/deserializing objects to/from
String
. - Serializing objects to XML: Exemplify at least two approaches for serializing/deserializing objects to/from XML format.
- Introducing JDK 9 deserialization filters: Provide a brief introduction to JDK 9 deserialization filters including some insights into the
ObjectInputFilter
API. - Implementing a custom pattern-based ObjectInputFilter: Provide an example of implementing and setting a custom pattern-based filter via the
ObjectInputFilter
API...