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.FileInputStreamAn implementation ofFileInputStreamthat creates aISpanfor 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 classSentryFileInputStream.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 voidclose()intread()intread(byte @NotNull [] b)intread(byte @NotNull [] b, int off, int len)longskip(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:
readin classjava.io.FileInputStream- Throws:
java.io.IOException
-
read
public int read(byte @NotNull [] b) throws java.io.IOException- Overrides:
readin classjava.io.FileInputStream- Throws:
java.io.IOException
-
read
public int read(byte @NotNull [] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FileInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.FileInputStream- 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.FileInputStream- Throws:
java.io.IOException
-
-