Package com.bumptech.glide.load
Class ImageHeaderParserUtils
- java.lang.Object
-
- com.bumptech.glide.load.ImageHeaderParserUtils
-
public final class ImageHeaderParserUtils extends java.lang.ObjectUtilities for the ImageHeaderParser.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetOrientation(java.util.List<ImageHeaderParser> parsers, ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, ArrayPool byteArrayPool)static intgetOrientation(java.util.List<ImageHeaderParser> parsers, java.io.InputStream is, ArrayPool byteArrayPool)Returns the orientation for the given InputStream.static intgetOrientation(java.util.List<ImageHeaderParser> parsers, java.nio.ByteBuffer buffer, ArrayPool arrayPool)Returns the result from the first ofparsersthat returns something other thanImageHeaderParser.UNKNOWN_ORIENTATION.static ImageHeaderParser.ImageTypegetType(java.util.List<ImageHeaderParser> parsers, ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, ArrayPool byteArrayPool)static ImageHeaderParser.ImageTypegetType(java.util.List<ImageHeaderParser> parsers, java.io.InputStream is, ArrayPool byteArrayPool)Returns the ImageType for the given InputStream.static ImageHeaderParser.ImageTypegetType(java.util.List<ImageHeaderParser> parsers, java.nio.ByteBuffer buffer)Returns the ImageType for the given ByteBuffer.
-
-
-
Method Detail
-
getType
@NonNull public static ImageHeaderParser.ImageType getType(@NonNull java.util.List<ImageHeaderParser> parsers, @Nullable java.io.InputStream is, @NonNull ArrayPool byteArrayPool) throws java.io.IOException
Returns the ImageType for the given InputStream.- Throws:
java.io.IOException
-
getType
@NonNull public static ImageHeaderParser.ImageType getType(@NonNull java.util.List<ImageHeaderParser> parsers, @Nullable java.nio.ByteBuffer buffer) throws java.io.IOException
Returns the ImageType for the given ByteBuffer.- Throws:
java.io.IOException
-
getType
@NonNull @RequiresApi(21) public static ImageHeaderParser.ImageType getType(@NonNull java.util.List<ImageHeaderParser> parsers, @NonNull ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, @NonNull ArrayPool byteArrayPool) throws java.io.IOException
- Throws:
java.io.IOException
-
getOrientation
public static int getOrientation(@NonNull java.util.List<ImageHeaderParser> parsers, @Nullable java.nio.ByteBuffer buffer, @NonNull ArrayPool arrayPool) throws java.io.IOExceptionReturns the result from the first ofparsersthat returns something other thanImageHeaderParser.UNKNOWN_ORIENTATION.If
bufferis null, the parers list is empty, or none of the parsers returns a valid value,ImageHeaderParser.UNKNOWN_ORIENTATIONis returned.- Throws:
java.io.IOException
-
getOrientation
public static int getOrientation(@NonNull java.util.List<ImageHeaderParser> parsers, @Nullable java.io.InputStream is, @NonNull ArrayPool byteArrayPool) throws java.io.IOExceptionReturns the orientation for the given InputStream.- Throws:
java.io.IOException
-
getOrientation
@RequiresApi(21) public static int getOrientation(@NonNull java.util.List<ImageHeaderParser> parsers, @NonNull ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, @NonNull ArrayPool byteArrayPool) throws java.io.IOException- Throws:
java.io.IOException
-
-