Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class Main {
    private static String PICTURE_TEMP_PATH;

    public static void savePicture(byte[] picture) throws IOException {

        OutputStream out = null;
        try {
            out = new FileOutputStream(PICTURE_TEMP_PATH);
            out.write(picture);
            out.flush();

        } finally {
            if (out != null) {
                out.close();
            }
        }
    }
}