Class TiffOutputDirectory
- java.lang.Object
-
- org.apache.commons.imaging.formats.tiff.write.AbstractTiffOutputItem
-
- org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory
-
- All Implemented Interfaces:
java.lang.Iterable<TiffOutputField>
public final class TiffOutputDirectory extends AbstractTiffOutputItem implements java.lang.Iterable<TiffOutputField>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.imaging.formats.tiff.write.AbstractTiffOutputItem
AbstractTiffOutputItem.Value
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractTiffImageDataabstractTiffImageDataprivate java.nio.ByteOrderbyteOrderstatic java.util.Comparator<TiffOutputDirectory>COMPARATORprivate java.util.List<TiffOutputField>fieldsprivate JpegImageDatajpegImageDataprivate TiffOutputDirectorynextDirectoryprivate inttype-
Fields inherited from class org.apache.commons.imaging.formats.tiff.write.AbstractTiffOutputItem
UNDEFINED_VALUE
-
-
Constructor Summary
Constructors Constructor Description TiffOutputDirectory(int type, java.nio.ByteOrder byteOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(TagInfoAsciiOrByte tagInfo, java.lang.String... values)voidadd(TagInfoAsciiOrRational tagInfo, java.lang.String... values)voidadd(TagInfoAsciiOrRational tagInfo, RationalNumber... values)voidadd(TagInfoAscii tagInfo, java.lang.String... values)voidadd(TagInfoByteOrShort tagInfo, byte... values)voidadd(TagInfoByteOrShort tagInfo, short... values)voidadd(TagInfoByte tagInfo, byte value)voidadd(TagInfoBytes tagInfo, byte... values)voidadd(TagInfoDouble tagInfo, double value)voidadd(TagInfoDoubles tagInfo, double... values)voidadd(TagInfoFloat tagInfo, float value)voidadd(TagInfoFloats tagInfo, float... values)voidadd(TagInfoGpsText tagInfo, java.lang.String value)voidadd(TagInfoLong tagInfo, int value)voidadd(TagInfoLongs tagInfo, int... values)voidadd(TagInfoRational tagInfo, RationalNumber value)voidadd(TagInfoRationals tagInfo, RationalNumber... values)voidadd(TagInfoSByte tagInfo, byte value)voidadd(TagInfoSBytes tagInfo, byte... values)voidadd(TagInfoShortOrLongOrRational tagInfo, int... values)voidadd(TagInfoShortOrLongOrRational tagInfo, short... values)voidadd(TagInfoShortOrLongOrRational tagInfo, RationalNumber... values)voidadd(TagInfoShortOrLong tagInfo, int... values)voidadd(TagInfoShortOrLong tagInfo, short... values)voidadd(TagInfoShortOrRational tagInfo, short... values)voidadd(TagInfoShortOrRational tagInfo, RationalNumber... values)voidadd(TagInfoShort tagInfo, short value)voidadd(TagInfoShorts tagInfo, short... values)voidadd(TagInfoSLong tagInfo, int value)voidadd(TagInfoSLongs tagInfo, int... values)voidadd(TagInfoSRational tagInfo, RationalNumber value)voidadd(TagInfoSRationals tagInfo, RationalNumber... values)voidadd(TagInfoSShort tagInfo, short value)voidadd(TagInfoSShorts tagInfo, short... values)voidadd(TagInfoXpString tagInfo, java.lang.String value)voidadd(TiffOutputField field)java.lang.Stringdescription()TiffOutputFieldfindField(int tag)Finds the TiffOutputField for the given tag from this TiffOutputDirectory.TiffOutputFieldfindField(TagInfo tagInfo)Finds the TiffOutputField for the given TagInfo from this TiffOutputDirectory.java.util.List<TiffOutputField>getFields()java.lang.StringgetItemDescription()intgetItemLength()protected java.util.List<AbstractTiffOutputItem>getOutputItems(TiffOutputSummary outputSummary)JpegImageDatagetRawJpegImageData()AbstractTiffImageDatagetRawTiffImageData()intgetType()java.util.Iterator<TiffOutputField>iterator()voidremoveField(int tag)voidremoveField(TagInfo tagInfo)private voidremoveFieldIfPresent(TagInfo tagInfo)voidsetJpegImageData(JpegImageData rawJpegImageData)voidsetNextDirectory(TiffOutputDirectory nextDirectory)voidsetTiffImageData(AbstractTiffImageData rawTiffImageData)voidsortFields()voidwriteItem(AbstractBinaryOutputStream bos)-
Methods inherited from class org.apache.commons.imaging.formats.tiff.write.AbstractTiffOutputItem
getOffset, setOffset
-
-
-
-
Field Detail
-
COMPARATOR
public static final java.util.Comparator<TiffOutputDirectory> COMPARATOR
-
type
private final int type
-
fields
private final java.util.List<TiffOutputField> fields
-
byteOrder
private final java.nio.ByteOrder byteOrder
-
nextDirectory
private TiffOutputDirectory nextDirectory
-
jpegImageData
private JpegImageData jpegImageData
-
abstractTiffImageData
private AbstractTiffImageData abstractTiffImageData
-
-
Method Detail
-
add
public void add(TagInfoAscii tagInfo, java.lang.String... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoAsciiOrByte tagInfo, java.lang.String... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoAsciiOrRational tagInfo, RationalNumber... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoAsciiOrRational tagInfo, java.lang.String... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoByte tagInfo, byte value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoByteOrShort tagInfo, byte... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoByteOrShort tagInfo, short... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoBytes tagInfo, byte... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoDouble tagInfo, double value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoDoubles tagInfo, double... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoFloat tagInfo, float value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoFloats tagInfo, float... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoGpsText tagInfo, java.lang.String value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoLong tagInfo, int value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoLongs tagInfo, int... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoRational tagInfo, RationalNumber value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoRationals tagInfo, RationalNumber... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSByte tagInfo, byte value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSBytes tagInfo, byte... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShort tagInfo, short value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrLong tagInfo, int... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrLong tagInfo, short... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrLongOrRational tagInfo, int... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrLongOrRational tagInfo, RationalNumber... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrLongOrRational tagInfo, short... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrRational tagInfo, RationalNumber... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShortOrRational tagInfo, short... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoShorts tagInfo, short... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSLong tagInfo, int value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSLongs tagInfo, int... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSRational tagInfo, RationalNumber value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSRationals tagInfo, RationalNumber... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSShort tagInfo, short value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoSShorts tagInfo, short... values) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TagInfoXpString tagInfo, java.lang.String value) throws ImagingException
- Throws:
ImagingException
-
add
public void add(TiffOutputField field)
-
description
public java.lang.String description()
-
findField
public TiffOutputField findField(int tag)
Finds the TiffOutputField for the given tag from this TiffOutputDirectory.If there is no field matching the given tag, null will be returned.
- Parameters:
tag- the tag specifying the field- Returns:
- the field matching tagInfo or null, if the field isn't present
- See Also:
findField(TagInfo)
-
findField
public TiffOutputField findField(TagInfo tagInfo)
Finds the TiffOutputField for the given TagInfo from this TiffOutputDirectory.If there is no field matching the given TagInfo, null will be returned.
- Parameters:
tagInfo- the TagInfo specifying the field- Returns:
- the field matching tagInfo or null, if the field isn't present
- See Also:
findField(int)
-
getFields
public java.util.List<TiffOutputField> getFields()
-
getItemDescription
public java.lang.String getItemDescription()
- Specified by:
getItemDescriptionin classAbstractTiffOutputItem
-
getItemLength
public int getItemLength()
- Specified by:
getItemLengthin classAbstractTiffOutputItem
-
getOutputItems
protected java.util.List<AbstractTiffOutputItem> getOutputItems(TiffOutputSummary outputSummary) throws ImagingException
- Throws:
ImagingException
-
getRawJpegImageData
public JpegImageData getRawJpegImageData()
-
getRawTiffImageData
public AbstractTiffImageData getRawTiffImageData()
-
getType
public int getType()
-
iterator
public java.util.Iterator<TiffOutputField> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<TiffOutputField>
-
removeField
public void removeField(int tag)
-
removeField
public void removeField(TagInfo tagInfo)
-
removeFieldIfPresent
private void removeFieldIfPresent(TagInfo tagInfo)
-
setJpegImageData
public void setJpegImageData(JpegImageData rawJpegImageData)
-
setNextDirectory
public void setNextDirectory(TiffOutputDirectory nextDirectory)
-
setTiffImageData
public void setTiffImageData(AbstractTiffImageData rawTiffImageData)
-
sortFields
public void sortFields()
-
writeItem
public void writeItem(AbstractBinaryOutputStream bos) throws java.io.IOException, ImagingException
- Specified by:
writeItemin classAbstractTiffOutputItem- Throws:
java.io.IOExceptionImagingException
-
-