Class SentryFileOutputStream

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

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

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

    • Method Summary

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

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

        flush, nullOutputStream
      • Methods inherited from class java.lang.Object

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

      • SentryFileOutputStream

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

        public SentryFileOutputStream​(@Nullable
                                      @Nullable java.lang.String name,
                                      boolean append)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • SentryFileOutputStream

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

        public SentryFileOutputStream​(@Nullable
                                      @Nullable java.io.File file,
                                      boolean append)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • SentryFileOutputStream

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

      • write

        public void write​(int b)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FileOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte @NotNull [] b)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FileOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte @NotNull [] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FileOutputStream
        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.FileOutputStream
        Throws:
        java.io.IOException