Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.IOException;

import java.io.OutputStream;

import java.util.zip.GZIPOutputStream;

public class Main {
    public final static byte GZIP = 1;

    public static OutputStream buildOutputStream(OutputStream os, byte type) throws IOException {
        switch (type) {
        case GZIP:
            return new GZIPOutputStream(os);
        default:
            return os;
        }
    }
}