rebuild.graphics.tiff.tags
Class RowsPerStripTag

java.lang.Object
  extended by rebuild.graphics.tiff.Tag
      extended by rebuild.graphics.tiff.tags.RowsPerStripTag

public final class RowsPerStripTag
extends Tag

The number of rows per strip.

Since:
BBX 1.0.1

Field Summary
 
Fields inherited from class rebuild.graphics.tiff.Tag
count, data, dataType, value
 
Constructor Summary
RowsPerStripTag()
          Set the number of rows-per-strip.
RowsPerStripTag(int rows)
          Set the number of rows-per-strip.
RowsPerStripTag(short rows)
          Set the number of rows-per-strip.
 
Method Summary
protected  boolean extraData(boolean big)
          No extra data, always returns false.
 int getRowsPerStrip()
          Get the rows-per-strip defined in this tag.
 int getStripsPerImage(int imageLength)
          Get the number of strips-per-image.
static short getTagTypeValue()
          Get the Tag's type.
 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)
          There is always only 1 element.
 void setDataType(short dataType)
          Data type is determined by the value.
protected  void setupForBigTIFF(boolean set)
          Setup the tag for writing in a BigTIFF.
 void setValue(int rows)
          Set the left-justified rows-per-strip that the tag contains.
 void writeData(Writer wr)
          Unused.
 
Methods inherited from class rebuild.graphics.tiff.Tag
equals, getBigCount, getBigValue, getCount, getDataType, getExtraData, getIfExtraDataExists, getTagType, getValue, hashCode, setCount, setExtraData, setValue, toString, write, write, write, write, writeBig
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RowsPerStripTag

public RowsPerStripTag()
Set the number of rows-per-strip. A "row" is the width of an image. A "strip" is a buffering method so that the TIFF reader can buffer the image in a easier manner instead of reading in the entire image at once. The default is (232) - 1, which is effectively infinity.


RowsPerStripTag

public RowsPerStripTag(short rows)
Set the number of rows-per-strip. A "row" is the width of an image. A "strip" is a buffering method so that the TIFF reader can buffer the image in a easier manner instead of reading in the entire image at once.

Parameters:
rows - The number of rows-per-strip.

RowsPerStripTag

public RowsPerStripTag(int rows)
Set the number of rows-per-strip. A "row" is the width of an image. A "strip" is a buffering method so that the TIFF reader can buffer the image in a easier manner instead of reading in the entire image at once.

Parameters:
rows - The number of rows-per-strip.
Method Detail

getTagTypeValue

public static short getTagTypeValue()
Get the Tag's type.

Returns:
The Tag's type.

setValue

public void setValue(int rows)
Set the left-justified rows-per-strip that the tag contains.

Overrides:
setValue in class Tag
Parameters:
rows - The rows-per-strip that the tag should contains.
See Also:
getValue

getRowsPerStrip

public int getRowsPerStrip()
Get the rows-per-strip defined in this tag.

Returns:
The rows-per-strip.

getStripsPerImage

public int getStripsPerImage(int imageLength)
Get the number of strips-per-image.

Parameters:
imageLength - The image length.
Returns:
The number of strips-per-image.
See Also:
ImageLengthTag

setDataType

public void setDataType(short dataType)
Data type is determined by the value.

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

setCount

public void setCount(int count)
There is always only 1 element.

Overrides:
setCount in class Tag
Parameters:
count - The number of values contained in the tag.
See Also:
setCount

writeData

public void writeData(Writer wr)
               throws java.io.IOException
Unused.

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.

extraData

protected boolean extraData(boolean big)
No extra data, always returns false.

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.

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.