code: public static <T extends Serializable> Flowable<T> read(final File file, final int bufferSize) {
          Callable<ObjectInputStream> resourceFactory = new Callable<ObjectInputStream>() {
              @Override
              public ObjectInputStream call() throws IOException {
                  return new ObjectInputStream(new BufferedInputStream(new FileInputStream(file), bufferSize));
              }
          };
          @SuppressWarnings("unchecked")
          Function<ObjectInputStream, Flowable<T>> flowableFactory = (Function<ObjectInputStream, Flowable<T>>) (Function<?, ?>) ObjectInputStreamFlowableFactoryHolder.INSTANCE;
          Consumer<ObjectInputStream> disposeAction = Consumers.close();
          return Flowable.using(resourceFactory, flowableFactory, disposeAction, true);
      }
docs: Returns the deserialized objects from the given {@link File} as a
  {@link Flowable} stream. Uses buffer of size <code>bufferSize</code>
  buffer reads from the File.
  
  @param file
  the input file
  @param bufferSize
  the buffer size for reading bytes from the file.
  @param <T>
  the generic type of the deserialized objects returned in the
  stream
  @return the stream of deserialized objects from the {@link InputStream}
  as a {@link Flowable}.