001/*
002 * $Id: RawPackCompressor.java,v 1.2 2005/08/26 11:22:27 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.BufferedOutputStream;
025import java.io.OutputStream;
026
027/**
028 * IzPack will be able to support different compression methods for the
029 * packs included in the installation jar file.
030 * This class implements the PackCompressor for the compression format "raw".
031 * 
032 * @author Klaus Bartz
033 */
034public class RawPackCompressor extends PackCompressorBase
035{
036    private static final String [] THIS_FORMAT_NAMES = {"raw", "uncompressed"};
037    /**
038     * 
039     */
040    public RawPackCompressor()
041    {
042        super();
043        formatNames = THIS_FORMAT_NAMES;
044    }
045
046    /* (non-Javadoc)
047     * @see com.izforge.izpack.compressor.PackCompressor#getOutputStream(java.io.OutputStream)
048     */
049    public OutputStream getOutputStream(OutputStream os)
050    {
051        // In this pack compressor we must not use reflection because
052        // the neede class will be always present (a base class of the VM).
053        return( new BufferedOutputStream(os));
054    }
055}