com.ssh.sft
Class RegularFile
java.lang.Object
com.ssh.sft.SftLib
com.ssh.sft.SftBase
com.ssh.sft.File
com.ssh.sft.RegularFile
- All Implemented Interfaces:
- com.ssh.sft.SftLibConstants, com.ssh.sft.SshSftFileType
- public class RegularFile
- extends File
A regular file. Regular files are files that contain binary data.
| Fields inherited from class com.ssh.sft.File |
SSH_SFT_DIR_RECURSIVE, SSH_SFT_FILE_TYPE_DIRECTORY, SSH_SFT_FILE_TYPE_REGULAR, SSH_SFT_FILE_TYPE_SPECIAL, SSH_SFT_FILE_TYPE_SYMLINK, SSH_SFT_FILE_TYPE_UNKNOWN, SSH_SFT_HASH_MAX_BLOCK_SIZE, SSH_SFT_HASH_MAX_ITERATIONS, SSH_SFT_HASH_MIN_BLOCK_SIZE, SSH_SFT_REQUEST_MAX_NUM, SSH_SFT_REQUEST_MAX_SIZE |
| Methods inherited from class com.ssh.sft.File |
copy, copy, getAttributes, getGroup, getLocation, getOwner, getPath, getSession, getSize, getURI, move, remove, rename, setAttributes |
RegularFile
public RegularFile()
openInput
public InputStream openInput()
throws SftException
- Opens this file and returns an InputStream for reading from
the file.
- Returns:
- a stream for reading from this file
- Throws:
SftException
openRawInput
public InputStream openRawInput()
throws SftException
- Opens this file and returns an unbuffered InputStream for
reading from this file. This method differs from
openInput() only in the fact that the returned stream is
unbuffered: every call to InputStream.read() involves a
separate network request to the remote SFTP server.
- Returns:
- an unbuffered stream for reading from this file
- Throws:
SftException
openRawOutput
public OutputStream openRawOutput()
throws SftException
- Throws:
SftException
openOutput
public OutputStream openOutput()
throws SftException
- Throws:
SftException
computeHash
public byte[] computeHash(String hashName,
long offset,
long len)
throws SftException
- Throws:
SftException
computeMD5
public byte[] computeMD5()
throws SftException
- Throws:
SftException