How To Install xstream on CentOS 7

In this tutorial we learn how to install xstream on CentOS 7. xstream is Java XML serialization library

Introduction

In this tutorial we learn how to install xstream on CentOS 7.

What is xstream

XStream is a simple library to serialize objects to XML and back again. A high level facade is supplied that simplifies common use cases. Custom objects can be serialized without need for specifying mappings. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization. XStream serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor. Duplicate references encountered in the object-model will be maintained. Supports circular references. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML). Strategies can be registered allowing customization of how particular types are represented as XML. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem.

We can use yum or dnf to install xstream on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install xstream.

Install xstream on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install xstream using yum by running the following command:

sudo yum -y install xstream

Install xstream on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install xstream using dnf by running the following command:

sudo dnf -y install xstream

How To Uninstall xstream on CentOS 7

To uninstall only the xstream package we can use the following command:

sudo dnf remove xstream

References

Summary

In this tutorial we learn how to install xstream on CentOS 7 using yum and dnf.