¿Cómo puedo identificar mediante programación que un archivo zip o rar está dividido o no en Java?

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?

preguntado el 28 de agosto de 12 a las 11:08

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. -

Do you know whether you're specifically talking about split or spanning zips/rars? Or do you need to support both? -

i need for both zip and rar,its ok even if it is two different solution -

1 Respuestas

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.

Para obtener más información, consulte:

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

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

Respondido 28 ago 12, 11:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.