code: public static <T extends Serializable> Observable<T> read(final File file,
              final int bufferSize) {
          Func0<ObjectInputStream> resourceFactory = new Func0<ObjectInputStream>() {
              @Override
              public ObjectInputStream call() {
                  try {
                      return new ObjectInputStream(
                              new BufferedInputStream(new FileInputStream(file), bufferSize));
                  } catch (FileNotFoundException e) {
                      throw new RuntimeException(e);
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }
          };
          Func1<ObjectInputStream, Observable<? extends T>> observableFactory = new Func1<ObjectInputStream, Observable<? extends T>>() {
  
              @Override
              public Observable<? extends T> call(ObjectInputStream is) {
                  return read(is);
              }
          };
          Action1<ObjectInputStream> disposeAction = new Action1<ObjectInputStream>() {
  
              @Override
              public void call(ObjectInputStream ois) {
                  try {
                      ois.close();
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }
          };
          return Observable.using(resourceFactory, observableFactory, disposeAction, true);
      }
docs: Returns the deserialized objects from the given {@link File} as an
  {@link Observable} 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 an {@link Observable}.