|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrebuild.graphics.tiff.Tag
rebuild.graphics.tiff.tags.RationalTag
public class RationalTag
A tag that contains one or more Writer.RATIONAL
items.
Field Summary |
---|
Fields inherited from class rebuild.graphics.tiff.Tag |
---|
count, data, dataType, value |
Constructor Summary | |
---|---|
|
RationalTag(short tag)
Create a new RationalTag . |
|
RationalTag(short tag,
int[] num,
int[] den)
Create a new RationalTag . |
protected |
RationalTag(short tag,
int[] num,
int[] den,
short type)
Create a new RationalTag . |
|
RationalTag(short tag,
int num,
int den)
Create a new RationalTag . |
Method Summary | |
---|---|
protected boolean |
extraData(boolean big)
This method figures out if any extra data is exists, this method can search the data type, extra data, value, and count. |
int |
getDenominator(int index)
Get the denominator at the specified index. |
int |
getNumerator(int index)
Get the numerator at the specified index. |
boolean |
hasDefault()
Get if this Tag can have a default value, often defined by a parameter-less constructor. |
boolean |
isDefault()
Get if this Tag 's current value is the default value. |
void |
setCount(int count)
Set the number of Writer.RATIONAL contained in this tag. |
void |
setDataType(short dataType)
Data type is a Writer.RATIONAL . |
void |
setDenominator(int index,
int den)
Set the denominator at the specified index. |
protected void |
setExtraData(java.lang.Object obj)
Unused. |
void |
setNumerator(int index,
int num)
Set the numerator at the specified index. |
protected void |
setupForBigTIFF(boolean set)
Setup the tag for writing in a BigTIFF. |
void |
writeData(Writer wr)
The extra data writer, if any extra data exists then this method will be called and (through internal methods) a offset to the data will be used in place of the value parameter. |
Methods inherited from class rebuild.graphics.tiff.Tag |
---|
equals, getBigCount, getBigValue, getCount, getDataType, getExtraData, getIfExtraDataExists, getTagType, getTagTypeValue, getValue, hashCode, setCount, setValue, setValue, toString, write, write, write, write, writeBig |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RationalTag(short tag)
RationalTag
.
tag
- The tag value.public RationalTag(short tag, int num, int den)
RationalTag
.
tag
- The tag value.num
- The numerator for the Writer.RATIONAL
.den
- The denominator for the Writer.RATIONAL
.public RationalTag(short tag, int[] num, int[] den)
RationalTag
.
tag
- The tag value.num
- The numerators for the Writer.RATIONAL
.den
- The denominators for the Writer.RATIONAL
.protected RationalTag(short tag, int[] num, int[] den, short type)
RationalTag
.
tag
- The tag value.num
- The numerators for the Writer.RATIONAL
.den
- The denominators for the Writer.RATIONAL
.Method Detail |
---|
public final void setDataType(short dataType)
Writer.RATIONAL
.
setDataType
in class Tag
dataType
- The data type to set.setDataType
public void setCount(int count)
Writer.RATIONAL
contained in this tag.
setCount
in class Tag
count
- The number of Writer.RATIONAL
contained in the tag. If the number is bigger than the current count then it will add 0/1 Writer.RATIONAL
, else it will remove the Writer.RATIONAL
.getCount
protected final void setExtraData(java.lang.Object obj)
setExtraData
in class Tag
obj
- The extra data that the tag should contain.getExtraData
public final int getDenominator(int index)
index
- The index to get the denominator.
public final void setDenominator(int index, int den)
index
- The index to set the denominator.den
- The denominator to set at the specified index.public final int getNumerator(int index)
index
- The index to get the numerator.
public final void setNumerator(int index, int num)
index
- The index to set the numerator.num
- The numerator to set at the specified index.protected boolean extraData(boolean big)
extraData
in class Tag
big
- true
if the tag is being written to a BigTIFF, false
if otherwise.
protected void setupForBigTIFF(boolean set)
setupForBigTIFF
in class Tag
set
- true
if the tag should be preped for BigTIFF, false
if otherwise.public void writeData(Writer wr) throws java.io.IOException
value
parameter.
writeData
in class Tag
wr
- The writer used to write the extra data.
java.io.IOException
- If any IO exception occurs.public boolean hasDefault()
Tag
can have a default value, often defined by a parameter-less constructor.
hasDefault
in class Tag
true
if the Tag
has a default value, false
if otherwise. Default is false
.public boolean isDefault()
Tag
's current value is the default value. This is ignored if Tag.hasDefault()
returns false
.
isDefault
in class Tag
true
if the Tag
's value is the default value, false
if otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |