3

I need to identify the whether a particular zip or rar file is splitted or not.

Is there any library to deal with archive file in java?

Samy
  • 313
  • 1
  • 4
  • 19
  • ZIP is in the standard API package java.util.zip. Maybe it throws an exception, when an archive is splitted or corrupt. For rar files i don'T know. – Andreas Aug 28 '12 at 10:33
  • Do you know whether you're specifically talking about split or spanning zips/rars? Or do you need to support both? – Vala Aug 28 '12 at 10:37
  • i need for both zip and rar,its ok even if it is two different solution – Samy Aug 28 '12 at 10:44
  • http://stackoverflow.com/questions/243992/how-to-split-a-huge-zip-file-into-multiple-volumes this should help you – Pranalee Aug 28 '12 at 10:51

1 Answers1

1

Usually multivolume RAR Files will follow the following name convention:

somefile.part01.rar
somefile.part02.rar
somefile.part03.rar

Or, using the older naming convention, like this:

somefile.r00
somefile.r01
somefile.r02

For Zip files: A split archive with 20 split files the files are typically named (replace ARCHIVE with the name of your archive) :

ARCHIVE.z01 
ARCHIVE.z02 
... 
ARCHIVE.z19 
ARCHIVE.zip 

Note that the last file is the .zip file.

For more information take a look at:

http://www.info-zip.org/mans/zip.html

http://kb.winzip.com/kb/entry/154/

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130