|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maverick.scp.ScpClientIO.ScpEngineIO
Implements an SCP engine.
Field Summary | |
protected byte[] |
buffer
|
protected java.lang.String |
cmd
|
protected java.io.InputStream |
in
|
protected java.io.OutputStream |
out
|
protected SshSession |
session
|
Constructor Summary | |
protected |
ScpClientIO.ScpEngineIO(java.lang.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(java.lang.String cmd,
java.lang.String[] cmdParts)
Parse an SCP command |
protected void |
readCompleteFile(java.io.OutputStream out,
long size,
FileTransferProgress progress)
|
protected java.io.InputStream |
readStreamFromRemote(java.lang.String remoteFile,
FileTransferProgress progress)
Open an InputStream. |
protected java.lang.String |
readString()
|
void |
waitForResponse()
|
protected void |
writeCompleteFile(java.io.InputStream in,
long size,
FileTransferProgress progress)
|
protected void |
writeError(java.lang.String reason)
|
protected void |
writeOk()
|
protected void |
writeStreamToRemote(java.io.InputStream in,
long length,
java.lang.String localName,
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 java.lang.String cmd
protected SshSession session
protected java.io.OutputStream out
protected java.io.InputStream in
Constructor Detail |
protected ScpClientIO.ScpEngineIO(java.lang.String cmd, SshSession session) throws SshException
Contruct the channel with the specified scp command.
cmd
- the scp commandsession
- the session to scp overMethod Detail |
public void close() throws SshException
SshException
protected void writeStreamToRemote(java.io.InputStream in, long length, java.lang.String localName, FileTransferProgress progress) throws java.io.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 writelocalName
- local file name
java.io.IOException
- if an IO error occursprotected java.io.InputStream readStreamFromRemote(java.lang.String remoteFile, FileTransferProgress progress) throws java.io.IOException
java.io.IOException
protected void parseCommand(java.lang.String cmd, java.lang.String[] cmdParts) throws java.io.IOException
cmd
- cmdParts
-
java.io.IOException
protected java.lang.String readString() throws java.io.IOException
java.io.IOException
public void waitForResponse() throws java.io.IOException
java.io.IOException
protected void writeOk() throws java.io.IOException
java.io.IOException
protected void writeError(java.lang.String reason) throws java.io.IOException
java.io.IOException
protected void writeCompleteFile(java.io.InputStream in, long size, FileTransferProgress progress) throws java.io.IOException
java.io.IOException
protected void readCompleteFile(java.io.OutputStream out, long size, FileTransferProgress progress) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |