dk.apaq.vfs.impl.sftp
Class SftpFile

java.lang.Object
  extended by dk.apaq.vfs.impl.sftp.SftpNode
      extended by dk.apaq.vfs.impl.sftp.SftpFile
All Implemented Interfaces:
File, Node, Serializable, Comparable

public class SftpFile
extends SftpNode
implements File

Author:
krog
See Also:
Serialized Form

Field Summary
 
Fields inherited from class dk.apaq.vfs.impl.sftp.SftpNode
entry, fileSystem, path
 
Constructor Summary
SftpFile(SftpFileSystem filesystem, Path path, ch.ethz.ssh2.SFTPv3DirectoryEntry entry)
           
 
Method Summary
 InputStream getInputStream()
          Retrieves the inputstream of the file to read from.
 long getLength()
          Retrieves the size/length of the file in bytes.
 OutputStream getOutputStream()
          Retrieves the outputstream of the file to write to.
 
Methods inherited from class dk.apaq.vfs.impl.sftp.SftpNode
canRead, canWrite, compareTo, compareTo, delete, equals, getBaseName, getFileSystem, getLastModified, getName, getParent, getPath, getSuffix, isDirectory, isFile, isHidden, isRoot, moveTo, moveTo, resolveChildEntry, setLastModified, setName, toUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dk.apaq.vfs.Node
canRead, canWrite, compareTo, delete, equals, getBaseName, getFileSystem, getLastModified, getName, getParent, getPath, getSuffix, isDirectory, isFile, isHidden, moveTo, moveTo, setLastModified, setName, toUri
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

SftpFile

public SftpFile(SftpFileSystem filesystem,
                Path path,
                ch.ethz.ssh2.SFTPv3DirectoryEntry entry)
         throws IOException
Throws:
IOException
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: File
Retrieves the inputstream of the file to read from.

Specified by:
getInputStream in interface File
Returns:
The inputstream.
Throws:
IOException - Throw if an error occures while retrieving the inputstream.

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Description copied from interface: File
Retrieves the outputstream of the file to write to.

Specified by:
getOutputStream in interface File
Returns:
The outputstream.
Throws:
IOException - Throw if an error occures while retrieving the outputstream.

getLength

public long getLength()
               throws IOException
Description copied from interface: File
Retrieves the size/length of the file in bytes.

Specified by:
getLength in interface File
Returns:
The size/length of the file in bytes.
Throws:
IOException - Throw if an error occures while retrieving the size/length.


Copyright © 2011. All Rights Reserved.