|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.scp.ScpClientIO.ScpEngineIO
public class ScpClientIO.ScpEngineIO
Implements an SCP engine.
| Field Summary | |
|---|---|
protected byte[] |
buffer
|
protected String |
cmd
|
protected InputStream |
in
|
protected OutputStream |
out
|
protected SshSession |
session
|
| Constructor Summary | |
|---|---|
protected |
ScpClientIO.ScpEngineIO(String cmd,
SshSession session)
Contruct the channel with the specified scp command. |
| Method Summary | |
|---|---|
void |
close()
Close the SCP engine and underlying session. |
protected void |
parseCommand(String cmd,
String[] cmdParts)
Parse an SCP command |
protected void |
readCompleteFile(OutputStream out,
long size,
FileTransferProgress progress)
|
protected InputStream |
readStreamFromRemote(String remoteFile,
FileTransferProgress progress)
Open an InputStream. |
protected String |
readString()
read the inputstream until come to an end of line character '\n', and return the bytes read as a string |
void |
waitForResponse()
|
protected void |
writeCompleteFile(InputStream in,
long size,
FileTransferProgress progress)
|
protected void |
writeError(String reason)
|
protected void |
writeOk()
|
protected void |
writeStreamToRemote(InputStream in,
long length,
String baseName,
FileTransferProgress progress)
Write a stream as a file to the remote server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] buffer
protected String cmd
protected SshSession session
protected OutputStream out
protected InputStream in
| Constructor Detail |
|---|
protected ScpClientIO.ScpEngineIO(String cmd,
SshSession session)
throws SshException
Contruct the channel with the specified scp command.
cmd - the scp commandsession - the session to scp over
SshException| Method Detail |
|---|
public void close()
throws SshException
SshException
protected void writeStreamToRemote(InputStream in,
long length,
String baseName,
FileTransferProgress progress)
throws IOException
Write a stream as a file to the remote server. You must supply the correct number of bytes that will be written.
in - streamlength - number of bytes to writebaseName - base file name
IOException - if an IO error occurs
protected InputStream readStreamFromRemote(String remoteFile,
FileTransferProgress progress)
throws IOException
remoteFile - progress -
IOException
protected void parseCommand(String cmd,
String[] cmdParts)
throws IOException
cmd - cmdParts -
IOException
protected String readString()
throws IOException
IOException
public void waitForResponse()
throws IOException
IOException
protected void writeOk()
throws IOException
IOException
protected void writeError(String reason)
throws IOException
IOException
protected void writeCompleteFile(InputStream in,
long size,
FileTransferProgress progress)
throws IOException
IOException
protected void readCompleteFile(OutputStream out,
long size,
FileTransferProgress progress)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||