Can we create tar file without using third party libraries?
Thanks in advance.
Regards, Sreenath Reddy
There is no build-in support of the tar format in the standard library, no.
But it is possible, yes. The Wikipedia page about tar has a overview description of the format, and also links to more detailed descriptions (in the External links section). You should not need more to create a tar file with Java. For convenience and performance, use a DataOutputStream on top of BufferedOutputStream and FileOutputStream (if you want to save this as a file).
Of course, using an existing tar library is less error prone, easier to use and might even be faster.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.