package com.android.gallery3d.exif;
+import java.nio.ByteOrder;
import java.util.ArrayList;
/**
private final IfdData[] mIfdDatas = new IfdData[IfdId.TYPE_IFD_COUNT];
private byte[] mThumbnail;
private ArrayList<byte[]> mStripBytes = new ArrayList<byte[]>();
+ private final ByteOrder mByteOrder;
+
+ public ExifData(ByteOrder order) {
+ mByteOrder = order;
+ }
/**
* Gets the IFD data of the specified IFD.
public byte[] getStrip(int index) {
return mStripBytes.get(index);
}
+
+ /**
+ * Gets the byte order.
+ */
+ public ByteOrder getByteOrder() {
+ return mByteOrder;
+ }
}
\ No newline at end of file
this.isRequested = isRequireByUser;
}
}
+
+ /**
+ * Gets the byte order of the current InputStream.
+ */
+ public ByteOrder getByteOrder() {
+ return mTiffStream.getByteOrder();
+ }
}
\ No newline at end of file
public ExifData read(InputStream inputStream) throws ExifInvalidFormatException,
IOException {
ExifParser parser = ExifParser.parse(inputStream);
- ExifData exifData = new ExifData();
+ ExifData exifData = new ExifData(parser.getByteOrder());
int event = parser.next();
while (event != ExifParser.EVENT_END) {