001/* 002 * $Id: DefaultPackCompressor.java,v 1.2 2005/08/26 11:22:53 bartzkau Exp $ 003 * IzPack - Copyright 2001-2005 Julien Ponge, All Rights Reserved. 004 * 005 * http://www.izforge.com/izpack/ 006 * http://developer.berlios.de/projects/izpack/ 007 * 008 * Copyright 2005 Klaus Bartz 009 * 010 * Licensed under the Apache License, Version 2.0 (the "License"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an "AS IS" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 */ 022package com.izforge.izpack.compressor; 023 024import java.io.OutputStream; 025 026 027 028/** 029 * IzPack will be able to support different compression methods for the 030 * packs included in the installation jar file. 031 * This class implements the PackCompressor for the compression format "default" 032 * which is current the LZ77 implementation of zlib (also known as 033 * zip or deflate). 034 * 035 * @author Klaus Bartz 036 */ 037public class DefaultPackCompressor extends PackCompressorBase 038{ 039 private static final String [] THIS_FORMAT_NAMES = 040 {"default", "deflate", "zip", "lz77"}; 041 private static final String [] THIS_CONTAINER_PATH = null; 042 private static final String THIS_DECODER_MAPPER = null; 043 private static final String [][] THIS_DECODER_CLASS_NAMES = null; 044 private static final String THIS_ENCODER_CLASS_NAME = null; 045 046 047 /** 048 * 049 */ 050 public DefaultPackCompressor() 051 { 052 super(); 053 formatNames = THIS_FORMAT_NAMES; 054 containerPaths = THIS_CONTAINER_PATH; 055 decoderMapper = THIS_DECODER_MAPPER; 056 encoderClassName = THIS_ENCODER_CLASS_NAME; 057 decoderClassNames = THIS_DECODER_CLASS_NAMES; 058 } 059 060 /* (non-Javadoc) 061 * @see com.izforge.izpack.compressor.PackCompressor#getOutputStream(java.io.OutputStream) 062 */ 063 public OutputStream getOutputStream(OutputStream os) 064 { 065 // This will crash the packager if implementation is wrong :-) 066 return(null); 067 } 068 069 /* (non-Javadoc) 070 * @see com.izforge.izpack.compressor.PackCompressor#useStandardCompression() 071 */ 072 public boolean useStandardCompression() 073 { 074 return(true); 075 } 076 /* (non-Javadoc) 077 * @see com.izforge.izpack.compressor.PackCompressor#needsBufferedOutputStream() 078 */ 079 public boolean needsBufferedOutputStream() 080 { 081 return(false); 082 } 083 084}