java - Platform independent way to read ZIP archives with TrueZip -



java - Platform independent way to read ZIP archives with TrueZip -

this may obvious question couldn't seem find answer.

we using truezip 7.7.1 , creating instances of zipfile read zip archives. when getting entries or input streams zipfile have specify entry name may contain path separator file scheme created on. current implementation naive , uses file.separator provided jvm doesn't work if archive created on file scheme different separator.

it seems there way tpath can apparently utilize either file.separator or "/" on either platform.

what's best way read zip archives in platform independent manor truezip 7.7.1?

according zip file format specifications (link), paths should stored '/' (thus beingness platform independent):

4.4.17.1 name of file, optional relative path. path stored must not contain drive or device letter, or leading slash. slashes must forwards slashes '/' opposed backwards slashes '\' compatibility amiga , unix file systems etc. if input came standard input, there no file name field.

so if stick convention, should not have worry platform running on @ all.

java truezip

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -