Class ExifOrientationStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class ExifOrientationStream
    extends java.io.FilterInputStream
    Adds an exif segment with an orientation attribute to a wrapped InputStream containing image data.

    This class assumes that the wrapped stream contains an image format that can contain exif information and performs no verification.

    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      ExifOrientationStream​(java.io.InputStream in, int orientation)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void mark​(int readLimit)  
      boolean markSupported()  
      int read()  
      int read​(byte[] buffer, int byteOffset, int byteCount)  
      void reset()  
      long skip​(long byteCount)  
      • Methods inherited from class java.io.FilterInputStream

        available, close, read
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExifOrientationStream

        public ExifOrientationStream​(java.io.InputStream in,
                                     int orientation)
    • Method Detail

      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.FilterInputStream
      • mark

        public void mark​(int readLimit)
        Overrides:
        mark in class java.io.FilterInputStream
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(@NonNull
                        byte[] buffer,
                        int byteOffset,
                        int byteCount)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long byteCount)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.FilterInputStream
        Throws:
        java.io.IOException