
com.nytimes.android.external.fs.SourceFileReader Maven / Gradle / Ivy
package com.nytimes.android.external.fs;
import com.nytimes.android.external.fs.filesystem.FileSystem;
import com.nytimes.android.external.store.base.DiskRead;
import com.nytimes.android.external.store.base.RecordState;
import com.nytimes.android.external.store.base.impl.BarCode;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnull;
import okio.BufferedSource;
import static com.nytimes.android.external.fs.SourcePersister.pathForBarcode;
public class SourceFileReader extends FSReader implements DiskRead {
public SourceFileReader(FileSystem fileSystem) {
super(fileSystem, new BarCodePathResolver());
}
@Nonnull
public RecordState getRecordState(@Nonnull BarCode barCode,
@Nonnull TimeUnit expirationUnit,
long expirationDuration) {
return fileSystem.getRecordState(expirationUnit, expirationDuration, pathForBarcode(barCode));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy