Examples of ChannelSftp


Examples of com.jcraft.jsch.ChannelSftp

    /**
     * Creates an input stream to read the file content from.
     */
    InputStream getInputStream(long filePointer) throws IOException
    {
        final ChannelSftp channel = fileSystem.getChannel();
        try
        {
            // hmmm - using the in memory method is soooo much faster ...
            // TODO - Don't read the entire file into memory. Use the
            // stream-based methods on ChannelSftp once they work properly final
            // .... no stream based method with resume???
            ByteArrayOutputStream outstr = new ByteArrayOutputStream();
            try
            {
                channel.get(getName().getPathDecoded(), outstr, null,
                        ChannelSftp.RESUME, filePointer);
            }
            catch (SftpException e)
            {
                throw new FileSystemException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.