KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > compressor > RawPackCompressor


1 /*
2  * $Id: RawPackCompressor.java 1708 2007-01-13 18:31:26Z jponge $
3  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
4  *
5  * http://www.izforge.com/izpack/
6  * http://developer.berlios.de/projects/izpack/
7  *
8  * Copyright 2005 Klaus Bartz
9  *
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.BufferedOutputStream JavaDoc;
25 import java.io.OutputStream JavaDoc;
26
27 /**
28  * IzPack will be able to support different compression methods for the
29  * packs included in the installation jar file.
30  * This class implements the PackCompressor for the compression format "raw".
31  *
32  * @author Klaus Bartz
33  */

34 public class RawPackCompressor extends PackCompressorBase
35 {
36     private static final String JavaDoc [] THIS_FORMAT_NAMES = {"raw", "uncompressed"};
37     /**
38      *
39      */

40     public RawPackCompressor()
41     {
42         super();
43         formatNames = THIS_FORMAT_NAMES;
44     }
45
46     /* (non-Javadoc)
47      * @see com.izforge.izpack.compressor.PackCompressor#getOutputStream(java.io.OutputStream)
48      */

49     public OutputStream JavaDoc getOutputStream(OutputStream JavaDoc os)
50     {
51         // In this pack compressor we must not use reflection because
52
// the neede class will be always present (a base class of the VM).
53
return( new BufferedOutputStream JavaDoc(os));
54     }
55 }
56
Popular Tags