@@ -0,0 +1,733 @@
+package com.mooo.aimmac23.hub.videostorage;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0A%0Apublic interface StoredVideoDownloadContext %7B%0A%09%0A%09/**%0A%09 * Was the requested video found?%0A%09 * %0A%09 * @return%0A%09 */%0A%09boolean isVideoFound();%0A%09%0A%09/**%0A%09 * If the video was found, return an Input stream for the content, or null otherwise.%0A%09 * %0A%09 * @return%0A%09 */%0A%09InputStream getStream() throws IOException;%0A%09%0A%09/**%0A%09 * %0A%09 * @return the content length in bytes of the video, or null if we are using a storage%0A%09 * mechanism that doesn't tell us this.%0A%09 */%0A%09Long getContentLengthIfKnown();%0A%09%0A%09/**%0A%09 * Frees any resources allocated to this storage request. Should always be called, even%0A%09 * if the video is not found.%0A%09 * %0A%09 */%0A%09void close();%0A%09%0A%7D%0A

Refactor the video download functionality to be more flexible, and better at cleaning up things