Package com.google.appengine.api.files

Examples of com.google.appengine.api.files.FileReadChannel


     * @param closure the closure with the input stream as parameter
     * @return the original file, for chaining purpose
     * @throws IOException
     */
    public static AppEngineFile withInputStream(AppEngineFile file, Map<String, Object> options, Closure<?> closure) throws IOException {
        FileReadChannel readChannel = FileServiceFactory.getFileService().openReadChannel(file, isLocked(options));
        BufferedInputStream stream = new BufferedInputStream(Channels.newInputStream(readChannel));

        IOGroovyMethods.withStream(stream, closure);
        readChannel.close();

        return file;
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.files.FileReadChannel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.