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

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -