code: public static List<Event> fromObjectInputStream(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException
      {
          final List<Event> events = new ArrayList<Event>();
  
          while (objectInputStream.read() != -1) {
              final Event e = (Event) objectInputStream.readObject();
              events.add(e);
          }
          objectInputStream.close();
  
          return events;
      }
docs: Given a stream written by the serialization-writer library, extract all events.
  This assumes the file was written using ObjectOutputStream.
  
  @param objectInputStream stream to deserialize
  @return events contained in the file
  @throws java.io.IOException    generic IOException
  @throws ClassNotFoundException if the underlying Event class is not in the classpath