Class ImageHeaderParserUtils


  • public final class ImageHeaderParserUtils
    extends java.lang.Object
    Utilities for the ImageHeaderParser.
    • 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
      • getOrientation

        public static int getOrientation​(@NonNull
                                         java.util.List<ImageHeaderParser> parsers,
                                         @Nullable
                                         java.io.InputStream is,
                                         @NonNull
                                         ArrayPool byteArrayPool)
                                  throws java.io.IOException
        Returns 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