Package io.sentry.instrumentation.file
Class SentryFileOutputStream
java.lang.Object
java.io.OutputStream
java.io.FileOutputStream
io.sentry.instrumentation.file.SentryFileOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
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.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSentryFileOutputStream
(@NotNull FileDescriptor fdObj) SentryFileOutputStream
(@Nullable File file) SentryFileOutputStream
(@Nullable File file, boolean append) SentryFileOutputStream
(@Nullable String name) SentryFileOutputStream
(@Nullable String name, boolean append) -
Method Summary
Methods inherited from class java.io.FileOutputStream
getChannel, getFD
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
Constructor Details
-
SentryFileOutputStream
- Throws:
FileNotFoundException
-
SentryFileOutputStream
public SentryFileOutputStream(@Nullable @Nullable String name, boolean append) throws FileNotFoundException - Throws:
FileNotFoundException
-
SentryFileOutputStream
- Throws:
FileNotFoundException
-
SentryFileOutputStream
public SentryFileOutputStream(@Nullable @Nullable File file, boolean append) throws FileNotFoundException - Throws:
FileNotFoundException
-
SentryFileOutputStream
-
-
Method Details
-
write
- Overrides:
write
in classFileOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFileOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFileOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFileOutputStream
- Throws:
IOException
-