rebuild.graphics.tiff.tags
Class Long8Tag

java.lang.Object
  extended by rebuild.graphics.tiff.Tag
      extended by rebuild.graphics.tiff.tags.Long8Tag
Direct Known Subclasses:
SLong8Tag

public class Long8Tag
extends Tag

A tag that contains one or more Writer.LONG8 items.

Since:
BBX 1.0.1

Field Summary
 
Fields inherited from class rebuild.graphics.tiff.Tag
count, data, dataType, value
 
Constructor Summary
  Long8Tag(short tag)
          Create a new Long8Tag.
  Long8Tag(short tag, long val)
          Create a new Long8Tag.
  Long8Tag(short tag, long[] val)
          Create a new Long8Tag.
protected Long8Tag(short tag, long[] val, short type)
          Create a new Long8Tag.
 
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.
 long getLong8(int index)
          Get a Writer.LONG8 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.LONG8 contained in this tag.
 void setDataType(short dataType)
          Data type is a Writer.LONG8.
protected  void setExtraData(java.lang.Object obj)
          Unused.
 void setLong8(int index, long val)
          Set a Writer.LONG8 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

Long8Tag

public Long8Tag(short tag)
Create a new Long8Tag.

Parameters:
tag - The tag value.

Long8Tag

public Long8Tag(short tag,
                long val)
Create a new Long8Tag.

Parameters:
tag - The tag value.
val - The value the tag should store.

Long8Tag

public Long8Tag(short tag,
                long[] val)
Create a new Long8Tag.

Parameters:
tag - The tag value.
val - The values the tag should store.

Long8Tag

protected Long8Tag(short tag,
                   long[] val,
                   short type)
Create a new Long8Tag.

Parameters:
tag - The tag value.
val - The values the tag should store.
Method Detail

setDataType

public final void setDataType(short dataType)
Data type is a Writer.LONG8.

Overrides:
setDataType in class Tag
Parameters:
dataType - The data type to set.
See Also:
setDataType

setCount

public void setCount(int count)
Set the number of Writer.LONG8 contained in this tag.

Overrides:
setCount in class Tag
Parameters:
count - The number of Writer.LONG8 contained in the tag. If the number is bigger than the current count then it will add 0L Writer.LONG8, else it will remove the Writer.LONG8.
See Also:
getCount

setExtraData

protected final void setExtraData(java.lang.Object obj)
Unused.

Overrides:
setExtraData in class Tag
Parameters:
obj - The extra data that the tag should contain.
See Also:
getExtraData

getLong8

public final long getLong8(int index)
Get a Writer.LONG8 at the specified index.

Parameters:
index - The index to get the Writer.LONG8.
Returns:
The Writer.LONG8 at the specified index.

setLong8

public final void setLong8(int index,
                           long val)
Set a Writer.LONG8 at the specified index.

Parameters:
index - The index to set the Writer.LONG8.
val - The Writer.LONG8 to set at the specified index.

extraData

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. It is called whenever one of these types change.

Specified by:
extraData in class Tag
Parameters:
big - true if the tag is being written to a BigTIFF, false if otherwise.
Returns:
true if the tag contains extra data, false if otherwise.

setupForBigTIFF

protected void setupForBigTIFF(boolean set)
Setup the tag for writing in a BigTIFF.

Specified by:
setupForBigTIFF in class Tag
Parameters:
set - true if the tag should be preped for BigTIFF, false if otherwise.

writeData

public void writeData(Writer wr)
               throws java.io.IOException
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.

Specified by:
writeData in class Tag
Parameters:
wr - The writer used to write the extra data.
Throws:
java.io.IOException - If any IO exception occurs.

hasDefault

public boolean hasDefault()
Get if this Tag can have a default value, often defined by a parameter-less constructor.

Specified by:
hasDefault in class Tag
Returns:
true if the Tag has a default value, false if otherwise. Default is false.

isDefault

public boolean isDefault()
Get if this Tag's current value is the default value. This is ignored if Tag.hasDefault() returns false.

Specified by:
isDefault in class Tag
Returns:
true if the Tag's value is the default value, false if otherwise.