< prev index next >

src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java

Print this page

        

*** 231,241 **** * Returns the {@link TIFFTagSet}s of which this directory is aware. * * @return The {@code TIFFTagSet}s associated with this * {@code TIFFDirectory}. */ ! public TIFFTagSet[] getTagSets() { return tagSets.toArray(new TIFFTagSet[tagSets.size()]); } /** * Adds an element to the group of {@link TIFFTagSet}s of which this --- 231,241 ---- * Returns the {@link TIFFTagSet}s of which this directory is aware. * * @return The {@code TIFFTagSet}s associated with this * {@code TIFFDirectory}. */ ! public final TIFFTagSet[] getTagSets() { return tagSets.toArray(new TIFFTagSet[tagSets.size()]); } /** * Adds an element to the group of {@link TIFFTagSet}s of which this
*** 278,288 **** * has been defined or {@code null} otherwise. * * @return The parent {@code TIFFTag} of this * {@code TIFFDiectory} or {@code null}. */ ! public TIFFTag getParentTag() { return parentTag; } /** * Returns the {@link TIFFTag} which has tag number equal to --- 278,288 ---- * has been defined or {@code null} otherwise. * * @return The parent {@code TIFFTag} of this * {@code TIFFDiectory} or {@code null}. */ ! public final TIFFTag getParentTag() { return parentTag; } /** * Returns the {@link TIFFTag} which has tag number equal to
*** 291,311 **** * directory. * * @param tagNumber The tag number of interest. * @return The corresponding {@code TIFFTag} or {@code null}. */ ! public TIFFTag getTag(int tagNumber) { return TIFFIFD.getTag(tagNumber, tagSets); } /** * Returns the number of {@link TIFFField}s in this directory. * * @return The number of {@code TIFFField}s in this * {@code TIFFDirectory}. */ ! public int getNumTIFFFields() { return numLowFields + highFields.size(); } /** * Determines whether a TIFF field with the given tag number is --- 291,311 ---- * directory. * * @param tagNumber The tag number of interest. * @return The corresponding {@code TIFFTag} or {@code null}. */ ! public final TIFFTag getTag(int tagNumber) { return TIFFIFD.getTag(tagNumber, tagSets); } /** * Returns the number of {@link TIFFField}s in this directory. * * @return The number of {@code TIFFField}s in this * {@code TIFFDirectory}. */ ! public final int getNumTIFFFields() { return numLowFields + highFields.size(); } /** * Determines whether a TIFF field with the given tag number is
*** 313,323 **** * * @param tagNumber The tag number. * @return Whether a {@link TIFFTag} with tag number equal to * {@code tagNumber} is present in this {@code TIFFDirectory}. */ ! public boolean containsTIFFField(int tagNumber) { return (tagNumber >= 0 && tagNumber <= MAX_LOW_FIELD_TAG_NUM && lowFields[tagNumber] != null) || highFields.containsKey(Integer.valueOf(tagNumber)); } --- 313,323 ---- * * @param tagNumber The tag number. * @return Whether a {@link TIFFTag} with tag number equal to * {@code tagNumber} is present in this {@code TIFFDirectory}. */ ! public final boolean containsTIFFField(int tagNumber) { return (tagNumber >= 0 && tagNumber <= MAX_LOW_FIELD_TAG_NUM && lowFields[tagNumber] != null) || highFields.containsKey(Integer.valueOf(tagNumber)); }
*** 347,357 **** * * @param tagNumber The tag number of the tag associated with the field. * @return A {@code TIFFField} with the requested tag number of * {@code null} if no such field is present. */ ! public TIFFField getTIFFField(int tagNumber) { TIFFField f; if(tagNumber >= 0 && tagNumber <= MAX_LOW_FIELD_TAG_NUM) { f = lowFields[tagNumber]; } else { f = highFields.get(Integer.valueOf(tagNumber)); --- 347,357 ---- * * @param tagNumber The tag number of the tag associated with the field. * @return A {@code TIFFField} with the requested tag number of * {@code null} if no such field is present. */ ! public final TIFFField getTIFFField(int tagNumber) { TIFFField f; if(tagNumber >= 0 && tagNumber <= MAX_LOW_FIELD_TAG_NUM) { f = lowFields[tagNumber]; } else { f = highFields.get(Integer.valueOf(tagNumber));
*** 379,389 **** * Retrieves all TIFF fields from the directory. * * @return An array of all TIFF fields in order of numerically increasing * tag number. */ ! public TIFFField[] getTIFFFields() { // Allocate return value. TIFFField[] fields = new TIFFField[numLowFields + highFields.size()]; // Copy any low-index fields. int nextIndex = 0; --- 379,389 ---- * Retrieves all TIFF fields from the directory. * * @return An array of all TIFF fields in order of numerically increasing * tag number. */ ! public final TIFFField[] getTIFFFields() { // Allocate return value. TIFFField[] fields = new TIFFField[numLowFields + highFields.size()]; // Copy any low-index fields. int nextIndex = 0;
*** 418,428 **** * Converts the directory to a metadata object. * * @return A metadata instance initialized from the contents of this * {@code TIFFDirectory}. */ ! public IIOMetadata getAsMetadata() { return new TIFFImageMetadata(TIFFIFD.getDirectoryAsIFD(this)); } /** * Clones the directory and all the fields contained therein. --- 418,428 ---- * Converts the directory to a metadata object. * * @return A metadata instance initialized from the contents of this * {@code TIFFDirectory}. */ ! public final IIOMetadata getAsMetadata() { return new TIFFImageMetadata(TIFFIFD.getDirectoryAsIFD(this)); } /** * Clones the directory and all the fields contained therein.
< prev index next >