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 class  ChunkType.Attribute
    We made Attribute public for general usage outside of Attribute class.

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    BKGD  
    CHRM  
    GAMA  
    HIST  
    ICCP  
    IDAT  
    IEND  
    IHDR  
    ITXT  
    PHYS  
    PLTE  
    SBIT  
    SPLT  
    SRGB  
    TEXT  
    TIME  
    TRNS  
    UNKNOWN  
    ZTXT  
  • Method Summary

    Modifier and Type Method Description
    static boolean containsIgnoreCase​(java.lang.String name)  
    static ChunkType fromInt​(int value)  
    static ChunkType fromString​(java.lang.String name)  
    ChunkType.Attribute getAttribute()  
    java.lang.String getName()  
    int getRanking()
    Ranking is used for sorting chunks to make them conform to PNG specification before passing them to PNGWriter.
    int getValue()  
    java.lang.String toString()  
    static ChunkType valueOf​(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.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static ChunkType[] 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

      public static ChunkType valueOf​(java.lang.String name)
      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 name
      java.lang.NullPointerException - if the argument is null
    • getAttribute

      public ChunkType.Attribute 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:
      toString in class java.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

      public static ChunkType fromString​(java.lang.String name)
    • fromInt

      public static ChunkType fromInt​(int value)