diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-04-02 23:47:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-02 23:47:03 +0000 |
commit | 93d76a69aecf03e7ac7653bd088fe6bb64356ec1 (patch) | |
tree | 00dcd83510f2afca0305561c4dda0103c8bc2339 /gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java | |
parent | e3961e715d17179849901f2274e046b925b1a058 (diff) | |
parent | 43b9c0c3fce9cb877ca73cb34917fb2c7556c4d4 (diff) | |
download | android_packages_apps_Snap-93d76a69aecf03e7ac7653bd088fe6bb64356ec1.tar.gz android_packages_apps_Snap-93d76a69aecf03e7ac7653bd088fe6bb64356ec1.tar.bz2 android_packages_apps_Snap-93d76a69aecf03e7ac7653bd088fe6bb64356ec1.zip |
Merge "Speed improvements for ExifOutputStream." into gb-ub-photos-bryce
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java b/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java index 38b34fc6c..ae501a50f 100644 --- a/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java +++ b/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java @@ -18,6 +18,7 @@ package com.android.gallery3d.exif; import android.util.Log; +import java.io.BufferedOutputStream; import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -58,6 +59,7 @@ import java.nio.ByteOrder; class ExifOutputStream extends FilterOutputStream { private static final String TAG = "ExifOutputStream"; private static final boolean DEBUG = false; + private static final int STREAMBUFFER_SIZE = 0x00010000; // 64Kb private static final int STATE_SOI = 0; private static final int STATE_FRAME_HEADER = 1; @@ -80,7 +82,7 @@ class ExifOutputStream extends FilterOutputStream { private final ExifInterface mInterface; protected ExifOutputStream(OutputStream ou, ExifInterface iRef) { - super(ou); + super(new BufferedOutputStream(ou, STREAMBUFFER_SIZE)); mInterface = iRef; } |