Class SentryFileInputStream

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

    public final class SentryFileInputStream
    extends java.io.FileInputStream
    An implementation of FileInputStream that creates a ISpan for reading operation with filename and byte count set as description

    Note, that span is started when this InputStream is instantiated via constructor and finishes when the FileInputStream.close() is called.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      int read()  
      int read​(byte @NotNull [] b)  
      int read​(byte @NotNull [] b, int off, int len)  
      long skip​(long n)  
      • Methods inherited from class java.io.FileInputStream

        available, finalize, getChannel, getFD
      • Methods inherited from class java.io.InputStream

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

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

      • SentryFileInputStream

        public SentryFileInputStream​(@Nullable
                                     @Nullable java.lang.String name)
                              throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • SentryFileInputStream

        public SentryFileInputStream​(@Nullable
                                     @Nullable java.io.File file)
                              throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • SentryFileInputStream

        public SentryFileInputStream​(@NotNull
                                     @NotNull java.io.FileDescriptor fdObj)
    • Method Detail

      • read

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

        public int read​(byte @NotNull [] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte @NotNull [] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • skip

        public long skip​(long n)
                  throws java.io.IOException
        Overrides:
        skip in class java.io.FileInputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FileInputStream
        Throws:
        java.io.IOException