? TimestampedObserver
java.lang.Object
org.apache.commons.io.input.ObservableInputStream.Observer
org.apache.commons.io.input.TimestampedObserver
An observer with timestamps.
For example:
final TimestampedObserver timetampedObserver = new TimestampedObserver(); try (final ObservableInputStream inputStream = new ObservableInputStream(...), timetampedObserver)) { ... } System.out.printf("IO duration: %s%n", timetampedObserver.getOpenToCloseDuration());
- ???????:
- 2.9.0
-
?????
??? -
????
??????????void
closed()
Called to indicate that theObservableInputStream
has been closed.Gets the instant for when this instance was closed.Gets the instant for when this instance was created.Gets the Duration between creation and close.Gets the Duration between creation and now.toString()
??????? org.apache.commons.io.input.ObservableInputStream.Observer
data, data, error, finished
-
???????
-
TimestampedObserver
public TimestampedObserver()
-
-
??????
-
closed
???????:ObservableInputStream.Observer
Called to indicate that theObservableInputStream
has been closed.- ??:
closed
???ObservableInputStream.Observer
- ??:
IOException
- if an I/O error occurs.
-
getCloseInstant
Gets the instant for when this instance was closed.- ??:
- the instant for when closed was called.
-
getOpenToCloseDuration
Gets the Duration between creation and close.- ??:
- the Duration between creation and close.
-
getOpenToNowDuration
Gets the Duration between creation and now.- ??:
- the Duration between creation and now.
-
getOpenInstant
Gets the instant for when this instance was created.- ??:
- the instant for when this instance was created.
-
toString
-