summaryrefslogtreecommitdiffstats
path: root/gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2013-03-11 19:00:12 -0700
committerRuben Brunk <rubenbrunk@google.com>2013-03-13 18:01:42 -0700
commit29fd4aa661f7e626a1d11558f09e8f7c011efcc2 (patch)
treec493ac90f0f3783e2efeea17083164a742cc621f /gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java
parentacca4ee0fefe6442b853510b6b360f6cb7ad1bc5 (diff)
downloadandroid_packages_apps_Snap-29fd4aa661f7e626a1d11558f09e8f7c011efcc2.tar.gz
android_packages_apps_Snap-29fd4aa661f7e626a1d11558f09e8f7c011efcc2.tar.bz2
android_packages_apps_Snap-29fd4aa661f7e626a1d11558f09e8f7c011efcc2.zip
Exif parser modifications.
Bug: 8018327 Change-Id: I66a2ec309f9807ac255bbf29d8f5f26de60e89b8
Diffstat (limited to 'gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java')
-rw-r--r--gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java b/gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java
index 4f785a889..428e6b9fc 100644
--- a/gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java
+++ b/gallerycommon/src/com/android/gallery3d/exif/OrderedDataOutputStream.java
@@ -29,24 +29,28 @@ class OrderedDataOutputStream extends FilterOutputStream {
super(out);
}
- public void setByteOrder(ByteOrder order) {
+ public OrderedDataOutputStream setByteOrder(ByteOrder order) {
mByteBuffer.order(order);
+ return this;
}
- public void writeShort(short value) throws IOException {
+ public OrderedDataOutputStream writeShort(short value) throws IOException {
mByteBuffer.rewind();
mByteBuffer.putShort(value);
out.write(mByteBuffer.array(), 0, 2);
- }
+ return this;
+ }
- public void writeInt(int value) throws IOException {
+ public OrderedDataOutputStream writeInt(int value) throws IOException {
mByteBuffer.rewind();
mByteBuffer.putInt(value);
out.write(mByteBuffer.array());
+ return this;
}
- public void writeRational(Rational rational) throws IOException {
- writeInt((int) rational.getNominator());
+ public OrderedDataOutputStream writeRational(Rational rational) throws IOException {
+ writeInt((int) rational.getNumerator());
writeInt((int) rational.getDenominator());
+ return this;
}
}