01: /*
02: * $Id: DefaultPackCompressor.java 2036 2008-02-09 11:14:05Z jponge $
03: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
04: *
05: * http://izpack.org/
06: * http://izpack.codehaus.org/
07: *
08: * Copyright 2005 Klaus Bartz
09: *
10: * Licensed under the Apache License, Version 2.0 (the "License");
11: * you may not use this file except in compliance with the License.
12: * You may obtain a copy of the License at
13: *
14: * http://www.apache.org/licenses/LICENSE-2.0
15: *
16: * Unless required by applicable law or agreed to in writing, software
17: * distributed under the License is distributed on an "AS IS" BASIS,
18: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19: * See the License for the specific language governing permissions and
20: * limitations under the License.
21: */
22: package com.izforge.izpack.compressor;
23:
24: import java.io.OutputStream;
25:
26: /**
27: * IzPack will be able to support different compression methods for the
28: * packs included in the installation jar file.
29: * This class implements the PackCompressor for the compression format "default"
30: * which is current the LZ77 implementation of zlib (also known as
31: * zip or deflate).
32: *
33: * @author Klaus Bartz
34: */
35: public class DefaultPackCompressor extends PackCompressorBase {
36: private static final String[] THIS_FORMAT_NAMES = { "default",
37: "deflate", "zip", "lz77" };
38: private static final String[] THIS_CONTAINER_PATH = null;
39: private static final String THIS_DECODER_MAPPER = null;
40: private static final String[][] THIS_DECODER_CLASS_NAMES = null;
41: private static final String THIS_ENCODER_CLASS_NAME = null;
42:
43: /**
44: *
45: */
46: public DefaultPackCompressor() {
47: super ();
48: formatNames = THIS_FORMAT_NAMES;
49: containerPaths = THIS_CONTAINER_PATH;
50: decoderMapper = THIS_DECODER_MAPPER;
51: encoderClassName = THIS_ENCODER_CLASS_NAME;
52: decoderClassNames = THIS_DECODER_CLASS_NAMES;
53: }
54:
55: /* (non-Javadoc)
56: * @see com.izforge.izpack.compressor.PackCompressor#getOutputStream(java.io.OutputStream)
57: */
58: public OutputStream getOutputStream(OutputStream os) {
59: // This will crash the packager if implementation is wrong :-)
60: return (null);
61: }
62:
63: /* (non-Javadoc)
64: * @see com.izforge.izpack.compressor.PackCompressor#useStandardCompression()
65: */
66: public boolean useStandardCompression() {
67: return (true);
68: }
69:
70: /* (non-Javadoc)
71: * @see com.izforge.izpack.compressor.PackCompressor#needsBufferedOutputStream()
72: */
73: public boolean needsBufferedOutputStream() {
74: return (false);
75: }
76:
77: }
|