de.unikassel.android.sdcframework.util
Class JarCompressionStrategy

Package class diagram package JarCompressionStrategy
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.ZipCompressionStrategy
      extended by de.unikassel.android.sdcframework.util.JarCompressionStrategy
All Implemented Interfaces:
CompressionStrategy

public class JarCompressionStrategy
extends ZipCompressionStrategy

The compression strategy to create JAR archives.


Constructor Summary
JarCompressionStrategy()
          Constructor
JarCompressionStrategy(boolean deflated)
          Constructor
 
Method Summary
protected  ZipEntry createArchiveEntry(String file)
          Does create an archive entry for the compressed file
protected  ZipOutputStream createDeflaterOutPutStream(BufferedOutputStream out)
          Does create the deflater output stream
 String getArchiveExtension()
          Getter for an archive file extension of this strategy
 
Methods inherited from class de.unikassel.android.sdcframework.util.ZipCompressionStrategy
compress, getMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarCompressionStrategy

public JarCompressionStrategy()
Constructor


JarCompressionStrategy

public JarCompressionStrategy(boolean deflated)
Constructor

Parameters:
deflated - flag for archive content compression ( true for compression )
Method Detail

createArchiveEntry

protected ZipEntry createArchiveEntry(String file)
Description copied from class: ZipCompressionStrategy
Does create an archive entry for the compressed file

Overrides:
createArchiveEntry in class ZipCompressionStrategy
Parameters:
file - the file name and path
Returns:
the archive entry

createDeflaterOutPutStream

protected ZipOutputStream createDeflaterOutPutStream(BufferedOutputStream out)
                                              throws IOException
Description copied from class: ZipCompressionStrategy
Does create the deflater output stream

Overrides:
createDeflaterOutPutStream in class ZipCompressionStrategy
Parameters:
out - the buffered output stream to wrap
Returns:
the deflater output stream
Throws:
IOException

getArchiveExtension

public String getArchiveExtension()
Description copied from interface: CompressionStrategy
Getter for an archive file extension of this strategy

Specified by:
getArchiveExtension in interface CompressionStrategy
Overrides:
getArchiveExtension in class ZipCompressionStrategy
Returns:
the archive file extension of this strategy