Top Description Inners Fields Constructors Methods
com.jogamp.opengl.util.texture

public Class ImageType

extends Object
Class Inheritance
Imports
java.io.BufferedInputStream, .IOException, .InputStream

Image type classification.

Allows to classify the ImageType of an InputStream via ImageType(InputStream) or to simply define one ImageType via ImageType(String).

Since
2.3.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ImageType.Util

Static utility functions for ImageType to determine the ImageType#type.

Field Summary

Modifier and TypeField and Description
private final int
public final byte[]
header

The optionally read header of size MAGIC_MAX_SIZE bytes as used to determine the type, i.e. ImageType(InputStream).

public static final int
MAGIC_MAX_SIZE

Minimum number of bytes to determine the image data type, i.e. bytes.

public static final String
T_3D2

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_3DMF

Constant which can be used as a file suffix to indicate an Apple QuickDraw 3D 3DMF stream, value .

public static final String
T_92I

Constant which can be used as a file suffix to indicate a Texas Instruments TI-92 Bitmap stream, value .

public static final String
T_AMFF

Constant which can be used as a file suffix to indicate an Amiga metafile stream, value .

public static final String
T_ART

Constant which can be used as a file suffix to indicate an America Online Art stream, value .

public static final String
T_BMP

Constant which can be used as a file suffix to indicate a GIF stream, value .

public static final String
T_CALS

Constant which can be used as a file suffix to indicate a United States Department of Defence Continuous Acquisition and Life-cycle Support Raster stream, value .

public static final String
T_CAM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_CBD

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_CE2

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_CIN

Constant which can be used as a file suffix to indicate a Kodak Cineon System stream, value .

public static final String
T_COB

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_CPT

Constant which can be used as a file suffix to indicate a Corel Photo Paint stream, value .

public static final String
T_CUR

Constant which can be used as a file suffix to indicate a Microsoft Windows Cursor stream, value .

public static final String
T_CVG

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_DCX

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_DDS

Constant which can be used as a file suffix to indicate a DirectDraw Surface stream, value .

public static final String
T_DEM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_DIB

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_DPX

Constant which can be used as a file suffix to indicate a Digital Picture Exchange stream, value .

public static final String
T_DRW

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_DWG

Constant which can be used as a file suffix to indicate a Autocad drawing stream, value .

public static final String
T_ECW

Constant which can be used as a file suffix to indicate a Hexagon Geospatial Enhanced Compression Wavelet stream, value .

public static final String
T_EMF

Constant which can be used as a file suffix to indicate a Microsoft Windows Enhanced metafile stream, value .

public static final String
T_FPX

Constant which can be used as a file suffix to indicate a FlashPix stream, value .

public static final String
T_FTS

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_GIF

Constant which can be used as a file suffix to indicate a GIF stream, value .

public static final String
T_GRO

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_HDR

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_HRU

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_ICNS

Constant which can be used as a file suffix to indicate an Apple Icon Image stream, value .

public static final String
T_ICO

Constant which can be used as a file suffix to indicate a Microsoft Windows Icon stream, value .

public static final String
T_IMG

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_INFINI_D

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_IWC

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_J6I

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_JIF

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_JP2

Constant which can be used as a file suffix to indicate a JPEG-2000 stream, value .

public static final String
T_JPG

Constant which can be used as a file suffix to indicate a JPEG stream, value .

public static final String
T_KDC

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_L64

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_LBM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_LDF

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_LWF

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_MBM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_MGL

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_MIF

Constant which can be used as a file suffix to indicate an Imagemagick stream, value .

public static final String
T_MNG

Constant which can be used as a file suffix to indicate a Multiple-image Network Graphics stream, value .

public static final String
T_MPW

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_MSP

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_N64

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_NCR

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_NFF

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_NGG

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_NLM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_NOL

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PAL

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PAM

Constant which can be used as a file suffix to indicate a Portable Arbitrary Map stream, NetPbm magic 7 - binary RGB and RGBA.

public static final String
T_PAX

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PBM

Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 4 - binary monochrome.

public static final String
T_PCD

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PCL

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PCX

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PGM

Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 5 - binary grayscale.

public static final String
T_PIC

Constant which can be used as a file suffix to indicate a Softimage pic stream, value .

public static final String
T_PIX

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PNG

Constant which can be used as a file suffix to indicate a PNG stream, value .

public static final String
T_POL

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_PPM

Constant which can be used as a file suffix to indicate a PAM stream, NetPbm magic 6 - binary RGB.

public static final String
T_PSD

Constant which can be used as a file suffix to indicate a Adobe PhotoShop stream, value .

public static final String
T_PSP

Constant which can be used as a file suffix to indicate a PaintShop Pro stream, value .

public static final String
T_QFX

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_QTM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_RAD

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_RAS

Constant which can be used as a file suffix to indicate a Sun Raster stream, value .

public static final String
T_RIX

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_SGI_RGB

Constant which can be used as a file suffix to indicate an SGI RGB stream, value .

public static final String
T_SID

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_SLD

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_SOD

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_TGA

Constant which can be used as a file suffix to indicate a Targa stream, value .

public static final String
T_TIFF

Constant which can be used as a file suffix to indicate a TIFF stream, value .

public static final String
T_WIC

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_WLM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_WMF

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_WPG

Constant which can be used as a file suffix to indicate a Wordperfect Graphics vectors stream, value .

public static final String
T_WRL

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_XBM

Constant which can be used as a file suffix to indicate a TBD stream, value .

public static final String
T_XPM

Constant which can be used as a file suffix to indicate a X PixMap stream, value .

public final String
type

The determined unique type, e.g. T_PNG, T_JPG, etc.

Maybe null if undetermined, i.e. isDefined() returns false.

Constructor Summary

AccessConstructor and Description
public
ImageType(final InputStream
stream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE
stream
)

Creates instance based on given stream.

public
ImageType(final String
must be one of T_PNG, T_JPG, etc.
type
)

Creates instance based on the given type.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public final int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public final boolean
isDefined()

Returns true if type is determined, i.e. not null, otherwise false.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

hashback to summary
private final int hash
MAGIC_MAX_SIZEback to summary
public static final int MAGIC_MAX_SIZE

Minimum number of bytes to determine the image data type, i.e. bytes.

T_3D2back to summary
public static final String T_3D2

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_3DMFback to summary
public static final String T_3DMF

Constant which can be used as a file suffix to indicate an Apple QuickDraw 3D 3DMF stream, value .

TODO

  • TODO
T_92Iback to summary
public static final String T_92I

Constant which can be used as a file suffix to indicate a Texas Instruments TI-92 Bitmap stream, value .

TODO

  • TODO
T_AMFFback to summary
public static final String T_AMFF

Constant which can be used as a file suffix to indicate an Amiga metafile stream, value .

TODO

  • TODO
T_ARTback to summary
public static final String T_ART

Constant which can be used as a file suffix to indicate an America Online Art stream, value .

TODO

  • TODO
T_BMPback to summary
public static final String T_BMP

Constant which can be used as a file suffix to indicate a GIF stream, value .

BM ascii code

FIXME: Collision or supertype of T_DIB?

  • http://www.fileformat.info/format/bmp/spec/e27073c25463436f8a64fa789c886d9c/view.htm
T_CALSback to summary
public static final String T_CALS

Constant which can be used as a file suffix to indicate a United States Department of Defence Continuous Acquisition and Life-cycle Support Raster stream, value .

TODO

  • http://www.fileformat.info/format/cals/egff.htm
T_CAMback to summary
public static final String T_CAM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_CBDback to summary
public static final String T_CBD

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_CE2back to summary
public static final String T_CE2

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_CINback to summary
public static final String T_CIN

Constant which can be used as a file suffix to indicate a Kodak Cineon System stream, value .

TODO

  • http://www.cineon.com/ff_draft.php
T_COBback to summary
public static final String T_COB

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_CPTback to summary
public static final String T_CPT

Constant which can be used as a file suffix to indicate a Corel Photo Paint stream, value .

TODO

  • TODO
T_CURback to summary
public static final String T_CUR

Constant which can be used as a file suffix to indicate a Microsoft Windows Cursor stream, value .

TODO

  • TODO
T_CVGback to summary
public static final String T_CVG

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_DCXback to summary
public static final String T_DCX

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_DDSback to summary
public static final String T_DDS

Constant which can be used as a file suffix to indicate a DirectDraw Surface stream, value .

'D' 'D' 'S' ' ' ascii code

  • https://msdn.microsoft.com/en-us/library/windows/desktop/bb943991%28v=vs.85%29.aspx#File_Layout1
T_DEMback to summary
public static final String T_DEM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_DIBback to summary
public static final String T_DIB

Constant which can be used as a file suffix to indicate a TBD stream, value .

FIXME: Collision or subtype of T_BMP?

  • TODO
T_DPXback to summary
public static final String T_DPX

Constant which can be used as a file suffix to indicate a Digital Picture Exchange stream, value .

TODO

  • TODO
T_DRWback to summary
public static final String T_DRW

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_DWGback to summary
public static final String T_DWG

Constant which can be used as a file suffix to indicate a Autocad drawing stream, value .

TODO

  • TODO
T_ECWback to summary
public static final String T_ECW

Constant which can be used as a file suffix to indicate a Hexagon Geospatial Enhanced Compression Wavelet stream, value .

TODO

  • TODO
T_EMFback to summary
public static final String T_EMF

Constant which can be used as a file suffix to indicate a Microsoft Windows Enhanced metafile stream, value .

TODO

  • TODO
T_FPXback to summary
public static final String T_FPX

Constant which can be used as a file suffix to indicate a FlashPix stream, value .

TODO

  • TODO
T_FTSback to summary
public static final String T_FTS

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_GIFback to summary
public static final String T_GIF

Constant which can be used as a file suffix to indicate a GIF stream, value .

GIF87A or GIF89A ascii code

  • http://www.w3.org/Graphics/GIF/spec-gif87a.txt http://www.w3.org/Graphics/GIF/spec-gif89a.txt
T_GROback to summary
public static final String T_GRO

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_HDRback to summary
public static final String T_HDR

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_HRUback to summary
public static final String T_HRU

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_ICNSback to summary
public static final String T_ICNS

Constant which can be used as a file suffix to indicate an Apple Icon Image stream, value .

'i' 'c' 'n' 's' ascii code

  • TODO
T_ICOback to summary
public static final String T_ICO

Constant which can be used as a file suffix to indicate a Microsoft Windows Icon stream, value .

TODO

  • https://msdn.microsoft.com/en-us/library/ms997538.aspx
T_IMGback to summary
public static final String T_IMG

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_INFINI_Dback to summary
public static final String T_INFINI_D

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_IWCback to summary
public static final String T_IWC

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_J6Iback to summary
public static final String T_J6I

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_JIFback to summary
public static final String T_JIF

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_JP2back to summary
public static final String T_JP2

Constant which can be used as a file suffix to indicate a JPEG-2000 stream, value .

TODO

  • TODO
T_JPGback to summary
public static final String T_JPG

Constant which can be used as a file suffix to indicate a JPEG stream, value .

  • http://www.faqs.org/faqs/jpeg-faq/part1/
  • http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=54989
T_KDCback to summary
public static final String T_KDC

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_L64back to summary
public static final String T_L64

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_LBMback to summary
public static final String T_LBM

Constant which can be used as a file suffix to indicate a TBD stream, value .

FIXME: Collision or supertype of T_RAD?

  • TODO
T_LDFback to summary
public static final String T_LDF

Constant which can be used as a file suffix to indicate a TBD stream, value .

FIXME: Collision or subtype of T_TIFF?

  • TODO
T_LWFback to summary
public static final String T_LWF

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_MBMback to summary
public static final String T_MBM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_MGLback to summary
public static final String T_MGL

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_MIFback to summary
public static final String T_MIF

Constant which can be used as a file suffix to indicate an Imagemagick stream, value .

TODO

  • TODO
T_MNGback to summary
public static final String T_MNG

Constant which can be used as a file suffix to indicate a Multiple-image Network Graphics stream, value .

TODO

  • TODO
T_MPWback to summary
public static final String T_MPW

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_MSPback to summary
public static final String T_MSP

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_N64back to summary
public static final String T_N64

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_NCRback to summary
public static final String T_NCR

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_NFFback to summary
public static final String T_NFF

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_NGGback to summary
public static final String T_NGG

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_NLMback to summary
public static final String T_NLM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_NOLback to summary
public static final String T_NOL

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PALback to summary
public static final String T_PAL

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PAMback to summary
public static final String T_PAM

Constant which can be used as a file suffix to indicate a Portable Arbitrary Map stream, NetPbm magic 7 - binary RGB and RGBA.

  • http://netpbm.sourceforge.net/doc/pam.html
T_PAXback to summary
public static final String T_PAX

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PBMback to summary
public static final String T_PBM

Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 4 - binary monochrome.

  • http://netpbm.sourceforge.net/doc/pbm.html
T_PCDback to summary
public static final String T_PCD

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PCLback to summary
public static final String T_PCL

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PCXback to summary
public static final String T_PCX

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PGMback to summary
public static final String T_PGM

Constant which can be used as a file suffix to indicate a PGM stream, NetPbm magic 5 - binary grayscale.

  • http://netpbm.sourceforge.net/doc/pgm.html
T_PICback to summary
public static final String T_PIC

Constant which can be used as a file suffix to indicate a Softimage pic stream, value .

TODO

  • http://paulbourke.net/dataformats/softimagepic/
T_PIXback to summary
public static final String T_PIX

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PNGback to summary
public static final String T_PNG

Constant which can be used as a file suffix to indicate a PNG stream, value .

  • http://www.libpng.org/pub/png/spec/1.1/PNG-Rationale.html#R.PNG-file-signature
T_POLback to summary
public static final String T_POL

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_PPMback to summary
public static final String T_PPM

Constant which can be used as a file suffix to indicate a PAM stream, NetPbm magic 6 - binary RGB.

  • http://netpbm.sourceforge.net/doc/ppm.html
T_PSDback to summary
public static final String T_PSD

Constant which can be used as a file suffix to indicate a Adobe PhotoShop stream, value .

TODO

  • TODO
T_PSPback to summary
public static final String T_PSP

Constant which can be used as a file suffix to indicate a PaintShop Pro stream, value .

TODO

  • TODO
T_QFXback to summary
public static final String T_QFX

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_QTMback to summary
public static final String T_QTM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_RADback to summary
public static final String T_RAD

Constant which can be used as a file suffix to indicate a TBD stream, value .

FIXME: Collision or subtype of T_LBM?

  • TODO
T_RASback to summary
public static final String T_RAS

Constant which can be used as a file suffix to indicate a Sun Raster stream, value .

TODO

  • TODO
T_RIXback to summary
public static final String T_RIX

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_SGI_RGBback to summary
public static final String T_SGI_RGB

Constant which can be used as a file suffix to indicate an SGI RGB stream, value .

"474 saved as a short" 474 = 0x01DA

  • http://paulbourke.net/dataformats/sgirgb/sgiversion.html
T_SIDback to summary
public static final String T_SID

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_SLDback to summary
public static final String T_SLD

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_SODback to summary
public static final String T_SOD

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_TGAback to summary
public static final String T_TGA

Constant which can be used as a file suffix to indicate a Targa stream, value .

T_TIFFback to summary
public static final String T_TIFF

Constant which can be used as a file suffix to indicate a TIFF stream, value .

Intentionally detects only the little endian tiff images ("II" in the spec).

FIXME: Collision or supertype of T_LDF?

  • http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
T_WICback to summary
public static final String T_WIC

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_WLMback to summary
public static final String T_WLM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_WMFback to summary
public static final String T_WMF

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_WPGback to summary
public static final String T_WPG

Constant which can be used as a file suffix to indicate a Wordperfect Graphics vectors stream, value .

TODO

  • TODO
T_WRLback to summary
public static final String T_WRL

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_XBMback to summary
public static final String T_XBM

Constant which can be used as a file suffix to indicate a TBD stream, value .

TODO

  • TODO
T_XPMback to summary
public static final String T_XPM

Constant which can be used as a file suffix to indicate a X PixMap stream, value .

TODO

  • TODO
typeback to summary
public final String type

The determined unique type, e.g. T_PNG, T_JPG, etc.

Maybe null if undetermined, i.e. isDefined() returns false.

Constructor Detail

ImageTypeback to summary
public ImageType(final InputStream stream) throws IOException

Creates instance based on given stream.

Parameters
stream:InputStream

stream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE

Exceptions
IOException:
if an I/O exception occurred
ImageTypeback to summary
public ImageType(final String type)

Creates instance based on the given type.

Parameters
type:String

must be one of T_PNG, T_JPG, etc.

Method Detail

equalsback to summary
public boolean equals(final Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
hashCodeback to summary
public final int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isDefinedback to summary
public final boolean isDefined()

Returns true if type is determined, i.e. not null, otherwise false.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
com.jogamp.opengl.util.texture back to summary

public Class ImageType.Util

extends Object
Class Inheritance

Static utility functions for ImageType to determine the ImageType#type.
Since
2.3.2

Constructor Summary

AccessConstructor and Description
public
Util()

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

the file suffix if any, otherwise null
getFileSuffix
(final InputStream
stream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE
stream
)

Determines the file suffix (i.e the image format) of the given InputStream.

public static String

Returns:

the file suffix if any, otherwise null
getFileSuffix
(InputStream
stream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE
stream
,
final byte[]
byte array sink, size must be ≥ MAGIC_MAX_SIZE
b
)

Determines the file suffix (i.e the image format) of the given InputStream.

public static String

Returns:

the file suffix if any, otherwise null
getFileSuffix
(final byte[]
byte array to parse, size must be ≥ MAGIC_MAX_SIZE
b
)

Determines the file suffix (i.e the image format) of the given bytes from the header of a file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilback to summary
public Util()

Method Detail

getFileSuffixback to summary
public static String getFileSuffix(final InputStream stream) throws IOException

Determines the file suffix (i.e the image format) of the given InputStream. The given InputStream must return true from markSupported() and support a minimum of MAGIC_MAX_SIZE bytes of read-ahead.

Parameters
stream:InputStream

stream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE

Returns:String

the file suffix if any, otherwise null

Exceptions
IOException:
if an I/O exception occurred
getFileSuffixback to summary
public static String getFileSuffix(InputStream stream, final byte[] b) throws IOException

Determines the file suffix (i.e the image format) of the given InputStream. The given InputStream must return true from markSupported() and support a minimum of MAGIC_MAX_SIZE bytes of read-ahead.

Parameters
stream:InputStream

stream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE

b:byte[]

byte array sink, size must be ≥ MAGIC_MAX_SIZE

Returns:String

the file suffix if any, otherwise null

Exceptions
IOException:
if an I/O exception occurred
getFileSuffixback to summary
public static String getFileSuffix(final byte[] b)

Determines the file suffix (i.e the image format) of the given bytes from the header of a file.

Parameters
b:byte[]

byte array to parse, size must be ≥ MAGIC_MAX_SIZE

Returns:String

the file suffix if any, otherwise null

Exceptions
IOException:
if an I/O exception occurred