Class HttpMillisecondStoreDataProvider
java.lang.Object
org.lukashian.store.external.ExternalResourceMillisecondStoreDataProvider
org.lukashian.store.external.http.HttpMillisecondStoreDataProvider
- All Implemented Interfaces:
MillisecondStoreDataProvider
- Direct Known Subclasses:
StandardEarthHttpMillisecondStoreDataProvider
This implementation of
ExternalResourceMillisecondStoreDataProvider
loads binary streams of long values from an HTTP location.
Please see ExternalResourceMillisecondStoreDataProvider
for more details regarding the external resource mechanism.
-
Field Summary
Fields inherited from class org.lukashian.store.external.ExternalResourceMillisecondStoreDataProvider
DEFAULT_DAY_EPOCH_MILLISECONDS_EXTENSION, DEFAULT_UNIX_EPOCH_OFFSET_EXTENSION, DEFAULT_YEAR_EPOCH_MILLISECONDS_EXTENSION
-
Constructor Summary
ConstructorsConstructorDescriptionHttpMillisecondStoreDataProvider
(String baseUrl) HttpMillisecondStoreDataProvider
(String baseUrl, String unixEpochOffsetUrlExtension, String yearEpochMillisecondsUrlExtension, String dayEpochMillisecondsUrlExtension) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
Loads an array of bytes from the specified location.Methods inherited from class org.lukashian.store.external.ExternalResourceMillisecondStoreDataProvider
loadDayEpochMilliseconds, loadUnixEpochOffsetMilliseconds, loadYearEpochMilliseconds
-
Constructor Details
-
HttpMillisecondStoreDataProvider
-
HttpMillisecondStoreDataProvider
-
-
Method Details
-
loadMillisecondsByteArray
Description copied from class:ExternalResourceMillisecondStoreDataProvider
Loads an array of bytes from the specified location. This location is a concatenation of the base location and one of the extensions, depending on which of the values needs loading.This method needs to return a binary stream from the specified location. This binary stream should encode the long values that represent the milliseconds. Each consecutive 8 bytes of the stream should correspond to an individual millisecond. This binary stream is then decoded into an array of longs. For the unix epoch offset, only a single long value (i.e. 8 bytes) should be returned in the binary stream.
- Specified by:
loadMillisecondsByteArray
in classExternalResourceMillisecondStoreDataProvider
- Throws:
IOException
InterruptedException
-