Package io.sentry.instrumentation.file
Class SentryFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FileOutputStream
-
- io.sentry.instrumentation.file.SentryFileOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public final class SentryFileOutputStream extends java.io.FileOutputStreamAn implementation ofFileOutputStreamthat creates aISpanfor writing operation with filename and byte count set as descriptionNote, that span is started when this OutputStream is instantiated via constructor and finishes when the
FileOutputStream.close()is called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSentryFileOutputStream.Factory
-
Constructor Summary
Constructors Constructor Description SentryFileOutputStream(@NotNull java.io.FileDescriptor fdObj)SentryFileOutputStream(@Nullable java.io.File file)SentryFileOutputStream(@Nullable java.io.File file, boolean append)SentryFileOutputStream(@Nullable java.lang.String name)SentryFileOutputStream(@Nullable java.lang.String name, boolean append)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidwrite(byte @NotNull [] b)voidwrite(byte @NotNull [] b, int off, int len)voidwrite(int b)
-
-
-
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:
writein classjava.io.FileOutputStream- Throws:
java.io.IOException
-
write
public void write(byte @NotNull [] b) throws java.io.IOException- Overrides:
writein classjava.io.FileOutputStream- Throws:
java.io.IOException
-
write
public void write(byte @NotNull [] b, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.FileOutputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.FileOutputStream- Throws:
java.io.IOException
-
-