JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.texture.ImageType.Util Class Reference

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

Collaboration diagram for com.jogamp.opengl.util.texture.ImageType.Util:

Static Public Member Functions

static String getFileSuffix (final InputStream stream) throws IOException
 Determines the file suffix (i.e the image format) of the given InputStream. More...
 
static String getFileSuffix (InputStream stream, final byte[] b) throws IOException
 Determines the file suffix (i.e the image format) of the given InputStream. More...
 
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. More...
 

Detailed Description

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

Since
2.3.2

Definition at line 1085 of file ImageType.java.

Member Function Documentation

◆ getFileSuffix() [1/3]

static String com.jogamp.opengl.util.texture.ImageType.Util.getFileSuffix ( final byte[]  b)
static

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

Parameters
bbyte array to parse, size must be ≥ MAGIC_MAX_SIZE
Returns
the file suffix if any, otherwise null
Exceptions
java.io.IOExceptionif an I/O exception occurred

Definition at line 1142 of file ImageType.java.

◆ getFileSuffix() [2/3]

static String com.jogamp.opengl.util.texture.ImageType.Util.getFileSuffix ( final InputStream  stream) throws IOException
static

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
streamstream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE
Returns
the file suffix if any, otherwise null
Exceptions
java.io.IOExceptionif an I/O exception occurred

Definition at line 1095 of file ImageType.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFileSuffix() [3/3]

static String com.jogamp.opengl.util.texture.ImageType.Util.getFileSuffix ( InputStream  stream,
final byte[]  b 
) throws IOException
static

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
streamstream to parse, InputStream#available() must be ≥ MAGIC_MAX_SIZE
bbyte array sink, size must be ≥ MAGIC_MAX_SIZE
Returns
the file suffix if any, otherwise null
Exceptions
java.io.IOExceptionif an I/O exception occurred

Definition at line 1108 of file ImageType.java.

Here is the call graph for this function:

The documentation for this class was generated from the following file: