Request InputStream/SeekableStream Media Downloader #647
Labels
imported
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
From nherr...@google.com on October 16, 2012 13:54:11
External references, such as a standards document, or specification? http://docs.oracle.com/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/com/sun/media/jai/codec/SeekableStream.html http://docs.oracle.com/javase/1.3/docs/api/java/io/InputStream.html Java environments (e.g. Java 6, Android 2.3, App Engine, or All)? Java 6, non-App Engine (at least for large requests) Please describe the feature requested. Instead of having an output sink to write bytes into, an app might prefer to have an input stream to read bytes out of, possibly making non-sequential access and multiple underlying HTTP requests to the web API for the data, and have it all happen just-in-time with some caching policy (i.e., cache all the file data, none of the data, last n KB of requests) and some capture policy (e.g., always the most recent version, or locked to a particular version & throw an exception otherwise -- using If-Match to ensure).
It would be great if you could turn a resource id into a SeekableStream that would then not make any requests for data until someone calls read on it. It would be nice if it also had knobs for caching (cache all reads | last n B of reads | only in m B chunks | preload all | preload first l B) and for resource expiration (e.g., if the resource is modified/deleted and the SeekableStream has to go to the service for more data -- perhaps it throws some kind of exception in those cases, or rather it flows gracefully to the next version) and handles all the retryable failures that might transpire (using the retry policy).
Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=633
The text was updated successfully, but these errors were encountered: