diff options
Diffstat (limited to 'gallerycommon')
-rw-r--r-- | gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java b/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java index 96672e8d7..ae501a50f 100644 --- a/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java +++ b/gallerycommon/src/com/android/gallery3d/exif/ExifOutputStream.java @@ -77,6 +77,7 @@ class ExifOutputStream extends FilterOutputStream { private int mState = STATE_SOI; private int mByteToSkip; private int mByteToCopy; + private byte[] mSingleByteArray = new byte[1]; private ByteBuffer mBuffer = ByteBuffer.allocate(4); private final ExifInterface mInterface; @@ -192,10 +193,8 @@ class ExifOutputStream extends FilterOutputStream { */ @Override public void write(int oneByte) throws IOException { - byte[] buf = new byte[] { - (byte) (0xff & oneByte) - }; - write(buf); + mSingleByteArray[0] = (byte) (0xff & oneByte); + write(mSingleByteArray); } /** |