Package pixy.image.png
Enum ChunkType
java.lang.Object
java.lang.Enum<ChunkType>
pixy.image.png.ChunkType
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ChunkType>,java.lang.constant.Constable
public enum ChunkType extends java.lang.Enum<ChunkType>
Define PNG chunk types
- Version:
- 1.0 10/16/2012
- Author:
- Wen Yu, yuwen_66@yahoo.com
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChunkType.AttributeWe made Attribute public for general usage outside of Attribute class. -
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static booleancontainsIgnoreCase(java.lang.String name)static ChunkTypefromInt(int value)static ChunkTypefromString(java.lang.String name)ChunkType.AttributegetAttribute()java.lang.StringgetName()intgetRanking()Ranking is used for sorting chunks to make them conform to PNG specification before passing them to PNGWriter.intgetValue()java.lang.StringtoString()static ChunkTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ChunkType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getAttribute
-
getName
public java.lang.String getName() -
getValue
public int getValue() -
getRanking
public int getRanking()Ranking is used for sorting chunks to make them conform to PNG specification before passing them to PNGWriter.- Returns:
- The ranking of the chunk for this chunk type
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Enum<ChunkType>
-
containsIgnoreCase
public static boolean containsIgnoreCase(java.lang.String name)- Parameters:
name- A String to test against the names of the chunks- Returns:
- True if a match is found, otherwise false.
-
fromString
-
fromInt
-