Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

import android.graphics.Rect;

import java.io.InputStream;

public class Main {
    public static Bitmap decodeStream(Context paramContext, InputStream paramInputStream) {
        try {
            Bitmap localBitmap = BitmapFactory.decodeStream(paramInputStream);
            return localBitmap;
        } catch (OutOfMemoryError localOutOfMemoryError) {
        }
        return null;
    }

    public static Bitmap decodeStream(Context paramContext, InputStream paramInputStream, Rect paramRect,
            BitmapFactory.Options paramOptions) {
        try {
            Bitmap localBitmap = BitmapFactory.decodeStream(paramInputStream, paramRect, paramOptions);
            return localBitmap;
        } catch (OutOfMemoryError localOutOfMemoryError) {
        }
        return null;
    }
}