Java – Decompress a Gzip file
In previous article, we show how to compress a file in Gzip format. This article shows how to decompress a Gzip file. We copy the GZIPInputStream into a FileOutputStream to…
Favourite tutorials for developers
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile.
In previous article, we show how to compress a file in Gzip format. This article shows how to decompress a Gzip file. We copy the GZIPInputStream into a FileOutputStream to…
This article shows how to use Java to compress a file in Gzip format. GZip is a standard file compression tool on Unix or Linux system, and generally has the…
The tar is for collecting files into one archive file, aka tarball, and generally has the suffix .tar. The Gzip is for compress files to save space and generally has…
This article shows how to use ZipInputStream and zip4j library to unzip a zip file in Java. To unzip a file manually, remember to add validation for the zip slip…
This article shows a few examples to zip a single file and a whole directory (including sub-files and subdirectories): (1) Zip a file – java.util.zip, (2) Zip a file –…
Java object Serialization is an API provided by Java Library stack as a means to serialize Java objects. Serialization is a process to convert objects into a writable byte stream.…
This article shows how to convert an object to byte or byte array and vice versa in Java. The example show how to use ByteArrayOutputStream and ObjectOutputStream to convert an…
In Java, transient fields are excluded in the serialization process. In short, when we save an object into a file (serialization), all transient fields are ignored.
This article shows you a few ways to generate the serialVersionUID for serialization class. JDK has a built-in command serialver to generate a serialVersionUID automatically. For Eclipse IDE, move the…
In Java, serialVersionUID is something like version control, assure both serialized and deserialized objects are using the compatible class. For example, if an object saved into a file (Serialization) with…