Package io.sentry.instrumentation.file
Class SentryFileInputStream
java.lang.Object
java.io.InputStream
java.io.FileInputStream
io.sentry.instrumentation.file.SentryFileInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An implementation of
FileInputStream
that creates a ISpan
for
reading operation with filename and byte count set as description
Note, that span is started when this InputStream is instantiated via constructor and finishes
when the FileInputStream.close()
is called.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSentryFileInputStream
(@NotNull FileDescriptor fdObj) SentryFileInputStream
(@Nullable File file) SentryFileInputStream
(@Nullable String name) -
Method Summary
Methods inherited from class java.io.FileInputStream
available, getChannel, getFD, readAllBytes, readNBytes
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readNBytes, reset, skipNBytes, transferTo
-
Constructor Details
-
SentryFileInputStream
- Throws:
FileNotFoundException
-
SentryFileInputStream
- Throws:
FileNotFoundException
-
SentryFileInputStream
-
-
Method Details
-
read
- Overrides:
read
in classFileInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFileInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFileInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFileInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFileInputStream
- Throws:
IOException
-