public class ScpHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COPY_BUFFER_SIZE
Default size (in bytes) of send / receive buffer size
|
static int |
DEFAULT_RECEIVE_BUFFER_SIZE |
static int |
DEFAULT_SEND_BUFFER_SIZE |
static int |
ERROR |
protected InputStream |
in |
protected static org.slf4j.Logger |
log |
static int |
MIN_COPY_BUFFER_SIZE
The minimum size for sending / receiving files
|
static int |
MIN_RECEIVE_BUFFER_SIZE |
static int |
MIN_SEND_BUFFER_SIZE |
static int |
OK |
protected OutputStream |
out |
protected FileSystemView |
root |
static int |
S_IRGRP |
static int |
S_IROTH |
static int |
S_IRUSR |
static int |
S_IWGRP |
static int |
S_IWOTH |
static int |
S_IWUSR |
static int |
S_IXGRP |
static int |
S_IXOTH |
static int |
S_IXUSR |
static int |
WARNING |
| Constructor and Description |
|---|
ScpHelper(InputStream in,
OutputStream out,
FileSystemView root) |
| Modifier and Type | Method and Description |
|---|---|
void |
ack() |
static EnumSet<SshFile.Permission> |
fromOctalPerms(String str) |
int |
readAck(boolean canEof) |
String |
readLine() |
String |
readLine(boolean canEof) |
void |
receive(SshFile path,
boolean recursive,
boolean shouldBeDir,
boolean preserve,
int bufferSize) |
void |
receiveDir(String header,
SshFile path,
long[] time,
boolean preserve,
int bufferSize) |
void |
receiveFile(String header,
SshFile path,
long[] time,
boolean preserve,
int bufferSize) |
void |
send(List<String> paths,
boolean recursive,
boolean preserve,
int bufferSize) |
void |
sendDir(SshFile path,
boolean preserve,
int bufferSize) |
void |
sendFile(SshFile path,
boolean preserve,
int bufferSize) |
static String |
toOctalPerms(EnumSet<SshFile.Permission> perms) |
protected static final org.slf4j.Logger log
public static final int OK
public static final int WARNING
public static final int ERROR
public static final int DEFAULT_COPY_BUFFER_SIZE
public static final int DEFAULT_RECEIVE_BUFFER_SIZE
public static final int DEFAULT_SEND_BUFFER_SIZE
public static final int MIN_COPY_BUFFER_SIZE
public static final int MIN_RECEIVE_BUFFER_SIZE
public static final int MIN_SEND_BUFFER_SIZE
public static final int S_IRUSR
public static final int S_IWUSR
public static final int S_IXUSR
public static final int S_IRGRP
public static final int S_IWGRP
public static final int S_IXGRP
public static final int S_IROTH
public static final int S_IWOTH
public static final int S_IXOTH
protected final FileSystemView root
protected final InputStream in
protected final OutputStream out
public ScpHelper(InputStream in, OutputStream out, FileSystemView root)
public void receive(SshFile path, boolean recursive, boolean shouldBeDir, boolean preserve, int bufferSize) throws IOException
IOExceptionpublic void receiveDir(String header, SshFile path, long[] time, boolean preserve, int bufferSize) throws IOException
IOExceptionpublic void receiveFile(String header, SshFile path, long[] time, boolean preserve, int bufferSize) throws IOException
IOExceptionpublic String readLine() throws IOException
IOExceptionpublic String readLine(boolean canEof) throws IOException
IOExceptionpublic void send(List<String> paths, boolean recursive, boolean preserve, int bufferSize) throws IOException
IOExceptionpublic void sendFile(SshFile path, boolean preserve, int bufferSize) throws IOException
IOExceptionpublic void sendDir(SshFile path, boolean preserve, int bufferSize) throws IOException
IOExceptionpublic static String toOctalPerms(EnumSet<SshFile.Permission> perms)
public static EnumSet<SshFile.Permission> fromOctalPerms(String str)
public void ack()
throws IOException
IOExceptionpublic int readAck(boolean canEof)
throws IOException
IOExceptionCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.