class ProtoStorageClient {

  public <T extends AbstractMessageLite> Maybe<T> read(Parser<T> parser) {
    return Maybe.fromCallable(
        () -> {
          // reads / writes are synchronized per client instance
          synchronized (this) {
            try (FileInputStream inputStream = application.openFileInput(fileName)) {
              return parser.parseFrom(inputStream);
            } catch (InvalidProtocolBufferException | FileNotFoundException e) {
              Logging.logi("Recoverable exception while reading cache: " + e.getMessage());
              return null;
            }
          }
        });
  }

  public  ProtoStorageClient(Application application, String fileName);

}