Package io.sentry.instrumentation.file
Class SentryFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FileInputStream
-
- io.sentry.instrumentation.file.SentryFileInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public final class SentryFileInputStream extends java.io.FileInputStream
An implementation ofFileInputStream
that creates aISpan
for reading operation with filename and byte count set as descriptionNote, that span is started when this InputStream is instantiated via constructor and finishes when the
FileInputStream.close()
is called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SentryFileInputStream.Factory
-
Constructor Summary
Constructors Constructor Description SentryFileInputStream(@NotNull java.io.FileDescriptor fdObj)
SentryFileInputStream(@Nullable java.io.File file)
SentryFileInputStream(@Nullable java.lang.String name)
-
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)
-
-
-
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 classjava.io.FileInputStream
- Throws:
java.io.IOException
-
read
public int read(byte @NotNull [] b) throws java.io.IOException
- Overrides:
read
in classjava.io.FileInputStream
- Throws:
java.io.IOException
-
read
public int read(byte @NotNull [] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.FileInputStream
- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.FileInputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.FileInputStream
- Throws:
java.io.IOException
-
-