jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFIFD.java
changeset 36448 a07e108d5722
parent 35660 471caf9d2ac0
child 40442 e97e9982be6d
equal deleted inserted replaced
36447:0d992a155d44 36448:a07e108d5722
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   151     public List<TIFFTagSet> getTagSetList() {
   151     public List<TIFFTagSet> getTagSetList() {
   152         return Arrays.asList(getTagSets());
   152         return Arrays.asList(getTagSets());
   153     }
   153     }
   154 
   154 
   155     /**
   155     /**
   156      * Returns an <code>Iterator</code> over the TIFF fields. The
   156      * Returns an {@code Iterator} over the TIFF fields. The
   157      * traversal is in the order of increasing tag number.
   157      * traversal is in the order of increasing tag number.
   158      */
   158      */
   159     // Note: the sort is guaranteed for low fields by the use of an
   159     // Note: the sort is guaranteed for low fields by the use of an
   160     // array wherein the index corresponds to the tag number and for
   160     // array wherein the index corresponds to the tag number and for
   161     // the high fields by the use of a TreeMap with tag number keys.
   161     // the high fields by the use of a TreeMap with tag number keys.
   162     public Iterator<TIFFField> iterator() {
   162     public Iterator<TIFFField> iterator() {
   163         return Arrays.asList(getTIFFFields()).iterator();
   163         return Arrays.asList(getTIFFFields()).iterator();
   164     }
   164     }
   165 
   165 
   166     /**
   166     /**
   167      * Read the value of a field. The <code>data</code> parameter should be
   167      * Read the value of a field. The {@code data} parameter should be
   168      * an array of length 1 of Object.
   168      * an array of length 1 of Object.
   169      *
   169      *
   170      * @param stream the input stream
   170      * @param stream the input stream
   171      * @param type the type as read from the stream
   171      * @param type the type as read from the stream
   172      * @param count the count read from the stream
   172      * @param count the count read from the stream
   760         this.stripOrTileByteCountsPosition = stripOrTileByteCountsPosition;
   760         this.stripOrTileByteCountsPosition = stripOrTileByteCountsPosition;
   761         this.lastPosition = lastPosition;
   761         this.lastPosition = lastPosition;
   762     }
   762     }
   763 
   763 
   764     /**
   764     /**
   765      * Returns a <code>TIFFIFD</code> wherein all fields from the
   765      * Returns a {@code TIFFIFD} wherein all fields from the
   766      * <code>BaselineTIFFTagSet</code> are copied by value and all other
   766      * {@code BaselineTIFFTagSet} are copied by value and all other
   767      * fields copied by reference.
   767      * fields copied by reference.
   768      */
   768      */
   769     public TIFFIFD getShallowClone() {
   769     public TIFFIFD getShallowClone() {
   770         // Get the baseline TagSet.
   770         // Get the baseline TagSet.
   771         TIFFTagSet baselineTagSet = BaselineTIFFTagSet.getInstance();
   771         TIFFTagSet baselineTagSet = BaselineTIFFTagSet.getInstance();