Lines Matching refs:offset

218         long offset = mTiffStream.readUnsignedInt();
219 if (offset > Integer.MAX_VALUE) {
220 throw new ExifInvalidFormatException("Invalid offset " + offset);
222 mIfd0Position = (int) offset;
225 registerIfd(IfdId.TYPE_IFD_0, offset);
226 if (offset != DEFAULT_IFD0_OFFSET) {
227 mDataAboveIfd0 = new byte[(int) offset - DEFAULT_IFD0_OFFSET];
275 int offset = mTiffStream.getReadByteCount();
277 if (offset < endOfTags) {
286 } else if (offset == endOfTags) {
297 // Some camera models use invalid length of the offset
365 int offset = mTiffStream.getReadByteCount();
366 if (offset > endOfTags) {
370 while (offset < endOfTags) {
372 offset += TAG_SIZE;
400 // The offset to interoperability IFD is located in Exif IFD
417 * pointed by the offset.
496 private void skipTo(int offset) throws IOException {
497 mTiffStream.skipTo(offset);
498 while (!mCorrespondingEvent.isEmpty() && mCorrespondingEvent.firstKey() < offset) {
518 private void registerIfd(int ifdType, long offset) {
519 // Cast unsigned int to int since the offset is always smaller
521 mCorrespondingEvent.put((int) offset, new IfdEvent(ifdType, isIfdRequested(ifdType)));
524 private void registerCompressedImage(long offset) {
525 mCorrespondingEvent.put((int) offset, new ImageEvent(EVENT_COMPRESSED_IMAGE));
528 private void registerUncompressedStrip(int stripIndex, long offset) {
529 mCorrespondingEvent.put((int) offset, new ImageEvent(EVENT_UNCOMPRESSED_STRIP
552 long offset = mTiffStream.readUnsignedInt();
553 if (offset > Integer.MAX_VALUE) {
555 "offset is larger then Integer.MAX_VALUE");
559 if ((offset < mIfd0Position) && (dataFormat == ExifTag.TYPE_UNDEFINED)) {
561 System.arraycopy(mDataAboveIfd0, (int) offset - DEFAULT_IFD0_OFFSET,
565 tag.setOffset((int) offset);
575 // Set the offset to the position of value.
582 * Check the tag, if the tag is one of the offset tag that points to the IFD
659 Log.w(TAG, "Invalid thumbnail offset: " + entry.getKey());
800 protected int read(byte[] buffer, int offset, int length) throws IOException {
801 return mTiffStream.read(buffer, offset, length);