<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">@Olaf:<div><br></div><div>Looking at the API you proposed</div><div><pre><i> public interface StreamingHandler<K> {</i><i>
</i> <i> void writeToKey(K key, InputStream largeObject);</i><i>
</i><i> OutputStream writeToKey(K key);</i><i>
</i><i> InputStream readFromKey(K key);</i><i>
</i><i> boolean removeKey(K key);</i><i>
</i><i> StreamingHandler<K> </i><i>withFlags(Flag... flags</i><i>);
</i><i> }</i></pre><div><br></div></div><div>and what I actually need:</div><div>* <a href="http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileService.java">http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileService.java</a></div><div>--> see <span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">openRecordWriteChannel</span> and <span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">openRecordReadChannel</span></div><div><br></div><div>Where the read has a way of jumping back&forth in the channel,</div><div>and write can seal the written bytes with closeFinally.</div><div>* <a href="http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileReadChannel.java">http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileReadChannel.java</a></div><div>* <a href="http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileWriteChannel.java">http://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/files/FileWriteChannel.java</a></div><div><br></div><div>Hence I guess we could change it to</div><div><br></div><div>Closeable writeToKey(K key, InputStream largeObject); -- returning a handle to seal off (making it immutable from then on)</div><div><br></div><div>InputStream readFromKey (K key, long position); -- also taking position into consideration</div><div><br></div><div>Wdyt?</div><div><br></div><div>(unfortunately I also don't have the time to help with impl, </div><div>but I'm definitely willing to test it (since I need it anyway, right :-)))</div><div><br></div><div>-Ales</div><div><br></div></body></html>