Package com.bumptech.glide.load
Class ImageHeaderParserUtils
java.lang.Object
com.bumptech.glide.load.ImageHeaderParserUtils
Utilities for the ImageHeaderParser.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intgetOrientation(List<ImageHeaderParser> parsers, ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, ArrayPool byteArrayPool) static intgetOrientation(List<ImageHeaderParser> parsers, InputStream is, ArrayPool byteArrayPool) Returns the orientation for the given InputStream.static intgetOrientation(List<ImageHeaderParser> parsers, ByteBuffer buffer, ArrayPool arrayPool) Returns the result from the first ofparsersthat returns something other thanImageHeaderParser.UNKNOWN_ORIENTATION.static ImageHeaderParser.ImageTypegetType(List<ImageHeaderParser> parsers, ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, ArrayPool byteArrayPool) static ImageHeaderParser.ImageTypegetType(List<ImageHeaderParser> parsers, InputStream is, ArrayPool byteArrayPool) Returns the ImageType for the given InputStream.static ImageHeaderParser.ImageTypegetType(List<ImageHeaderParser> parsers, ByteBuffer buffer) Returns the ImageType for the given ByteBuffer.
-
Method Details
-
getType
@NonNull public static ImageHeaderParser.ImageType getType(@NonNull List<ImageHeaderParser> parsers, @Nullable InputStream is, @NonNull ArrayPool byteArrayPool) throws IOException Returns the ImageType for the given InputStream.- Throws:
IOException
-
getType
@NonNull public static ImageHeaderParser.ImageType getType(@NonNull List<ImageHeaderParser> parsers, @Nullable ByteBuffer buffer) throws IOException Returns the ImageType for the given ByteBuffer.- Throws:
IOException
-
getType
@NonNull @RequiresApi(21) public static ImageHeaderParser.ImageType getType(@NonNull List<ImageHeaderParser> parsers, @NonNull ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, @NonNull ArrayPool byteArrayPool) throws IOException - Throws:
IOException
-
getOrientation
public static int getOrientation(@NonNull List<ImageHeaderParser> parsers, @Nullable ByteBuffer buffer, @NonNull ArrayPool arrayPool) throws IOException Returns 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:
IOException
-
getOrientation
public static int getOrientation(@NonNull List<ImageHeaderParser> parsers, @Nullable InputStream is, @NonNull ArrayPool byteArrayPool) throws IOException Returns the orientation for the given InputStream.- Throws:
IOException
-
getOrientation
@RequiresApi(21) public static int getOrientation(@NonNull List<ImageHeaderParser> parsers, @NonNull ParcelFileDescriptorRewinder parcelFileDescriptorRewinder, @NonNull ArrayPool byteArrayPool) throws IOException - Throws:
IOException
-