< prev index next >
src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java
Print this page
*** 64,84 ****
//////// Private variables
private static final boolean debug = false;
/**
! * A copy of <code>markerSequence</code>, created the first time the
! * <code>markerSequence</code> is modified. This is used by reset
* to restore the original state.
*/
private List<MarkerSegment> resetSequence = null;
/**
! * Set to <code>true</code> when reading a thumbnail stored as
* JPEG. This is used to enforce the prohibition of JFIF thumbnails
* containing any JFIF marker segments, and to ensure generation of
! * a correct native subtree during <code>getAsTree</code>.
*/
private boolean inThumb = false;
/**
* Set by the chroma node construction method to signal the
--- 64,84 ----
//////// Private variables
private static final boolean debug = false;
/**
! * A copy of {@code markerSequence}, created the first time the
! * {@code markerSequence} is modified. This is used by reset
* to restore the original state.
*/
private List<MarkerSegment> resetSequence = null;
/**
! * Set to {@code true} when reading a thumbnail stored as
* JPEG. This is used to enforce the prohibition of JFIF thumbnails
* containing any JFIF marker segments, and to ensure generation of
! * a correct native subtree during {@code getAsTree}.
*/
private boolean inThumb = false;
/**
* Set by the chroma node construction method to signal the
*** 91,101 ****
//////// end of private variables
/////// Package-access variables
/**
! * All data is a list of <code>MarkerSegment</code> objects.
* When accessing the list, use the tag to identify the particular
* subclass. Any JFIF marker segment must be the first element
* of the list if it is present, and any JFXX or APP2ICC marker
* segments are subordinate to the JFIF marker segment. This
* list is package visible so that the writer can access it.
--- 91,101 ----
//////// end of private variables
/////// Package-access variables
/**
! * All data is a list of {@code MarkerSegment} objects.
* When accessing the list, use the tag to identify the particular
* subclass. Any JFIF marker segment must be the first element
* of the list if it is present, and any JFXX or APP2ICC marker
* segments are subordinate to the JFIF marker segment. This
* list is package visible so that the writer can access it.
*** 130,150 ****
JPEG.nativeStreamMetadataFormatClassName;
}
}
/*
! * Constructs a <code>JPEGMetadata</code> object by reading the
! * contents of an <code>ImageInputStream</code>. Has package-only
* access.
*
* @param isStream A boolean indicating whether this object will be
* stream or image metadata.
* @param isThumb A boolean indicating whether this metadata object
* is for an image or for a thumbnail stored as JPEG.
! * @param iis An <code>ImageInputStream</code> from which to read
* the metadata.
! * @param reader The <code>JPEGImageReader</code> calling this
* constructor, to which warnings should be sent.
*/
JPEGMetadata(boolean isStream,
boolean isThumb,
ImageInputStream iis,
--- 130,150 ----
JPEG.nativeStreamMetadataFormatClassName;
}
}
/*
! * Constructs a {@code JPEGMetadata} object by reading the
! * contents of an {@code ImageInputStream}. Has package-only
* access.
*
* @param isStream A boolean indicating whether this object will be
* stream or image metadata.
* @param isThumb A boolean indicating whether this metadata object
* is for an image or for a thumbnail stored as JPEG.
! * @param iis An {@code ImageInputStream} from which to read
* the metadata.
! * @param reader The {@code JPEGImageReader} calling this
* constructor, to which warnings should be sent.
*/
JPEGMetadata(boolean isStream,
boolean isThumb,
ImageInputStream iis,
*** 363,373 ****
throw new IIOException("Inconsistent metadata read from stream");
}
}
/**
! * Constructs a default stream <code>JPEGMetadata</code> object appropriate
* for the given write parameters.
*/
JPEGMetadata(ImageWriteParam param, JPEGImageWriter writer) {
this(true, false);
--- 363,373 ----
throw new IIOException("Inconsistent metadata read from stream");
}
}
/**
! * Constructs a default stream {@code JPEGMetadata} object appropriate
* for the given write parameters.
*/
JPEGMetadata(ImageWriteParam param, JPEGImageWriter writer) {
this(true, false);
*** 396,406 ****
throw new InternalError("Default stream metadata is inconsistent");
}
}
/**
! * Constructs a default image <code>JPEGMetadata</code> object appropriate
* for the given image type and write parameters.
*/
JPEGMetadata(ImageTypeSpecifier imageType,
ImageWriteParam param,
JPEGImageWriter writer) {
--- 396,406 ----
throw new InternalError("Default stream metadata is inconsistent");
}
}
/**
! * Constructs a default image {@code JPEGMetadata} object appropriate
* for the given image type and write parameters.
*/
JPEGMetadata(ImageTypeSpecifier imageType,
ImageWriteParam param,
JPEGImageWriter writer) {
*** 2246,2256 ****
}
}
/**
* Check that this metadata object is in a consistent state and
! * return <code>true</code> if it is or <code>false</code>
* otherwise. All the constructors and modifiers should call
* this method at the end to guarantee that the data is always
* consistent, as the writer relies on this.
*/
private boolean isConsistent() {
--- 2246,2256 ----
}
}
/**
* Check that this metadata object is in a consistent state and
! * return {@code true} if it is or {@code false}
* otherwise. All the constructors and modifiers should call
* this method at the end to guarantee that the data is always
* consistent, as the writer relies on this.
*/
private boolean isConsistent() {
< prev index next >