class ProtoStorageClient {

  public Completable write(AbstractMessageLite messageLite) {
    return Completable.fromCallable(
        () -> {
          // reads / writes are synchronized per client instance
          synchronized (this) {
            try (FileOutputStream output = application.openFileOutput(fileName, MODE_PRIVATE)) {
              output.write(messageLite.toByteArray());
              return messageLite;
            }
          }
        });
  }

  public  ProtoStorageClient(Application application, String fileName);

}