/** * Given a stream written by the serialization-writer library, extract all events. * This assumes the file was written using ObjectOutputStream. * * @param stream 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 */ public static List<Event> fromInputStream(final InputStream stream) throws IOException, ClassNotFoundException { return fromObjectInputStream(new ObjectInputStream(stream)); }