com.partnersoft.io.formats.boxcar
Class BoxcarLib
java.lang.Object
com.partnersoft.io.formats.boxcar.BoxcarLib
public class BoxcarLib
- extends java.lang.Object
Boxcar is a very simple archive format, consisting of a stream of a
files; each file has its full (relative) file path first in UTF
format, followed by 8 bytes of currently unused flag information,
followed by a 8-byte length, followed by the file's bytes. The
whole is then gzip-compressed into a single file.
Files are sorted asciibetically by path.
It is NOT the intent of boxcar to accurately reproduce a filesystem
with permissions, dates, etc. Instead these are left out to
facilitate update schemes where the file date etc. would cause
unnecessary changes in the update archive. For example, if a map
set were translated twice and zipped up each time, the zipfiles
would differ because of the changed dates and possibly do to
ordering issues, even though the file data should be identical.
- Author:
- Paul Reavis
Copyright 2005 Partner Software, Inc.
|
Method Summary |
static void |
pack(java.io.File boxcarFile,
java.util.List inputFiles)
Creates a new boxcar archive. |
static void |
unpack(java.io.File boxcarFile)
|
static void |
unpack(java.io.File boxcarFile,
java.io.File destinationDir)
Unpacks a new boxcar archive. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoxcarLib
public BoxcarLib()
pack
public static void pack(java.io.File boxcarFile,
java.util.List inputFiles)
throws java.io.IOException
- Creates a new boxcar archive. If the archive has a ".gz"
extension, automatically compresses via GZip as well.
- Throws:
java.io.IOException
unpack
public static void unpack(java.io.File boxcarFile)
throws java.io.IOException
- Throws:
java.io.IOException
unpack
public static void unpack(java.io.File boxcarFile,
java.io.File destinationDir)
throws java.io.IOException
- Unpacks a new boxcar archive. If the archive has a ".gz"
extension, automatically decompresses via GZip as well.
- Throws:
java.io.IOException