Class ScpAckInfo
- java.lang.Object
-
- org.apache.sshd.scp.common.helpers.ScpAckInfo
-
public class ScpAckInfo extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ERROR
private java.lang.String
line
static int
OK
private int
statusCode
static int
WARNING
-
Constructor Summary
Constructors Constructor Description ScpAckInfo(int statusCode)
ScpAckInfo(int statusCode, java.lang.String line)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLine()
int
getStatusCode()
static ScpAckInfo
readAck(java.io.InputStream in, boolean canEof)
<O extends java.io.OutputStream>
Osend(O out)
static <O extends java.io.OutputStream>
OsendAck(O out, int level, java.lang.String message)
static <O extends java.io.OutputStream>
OsendError(O out, java.lang.String message)
static void
sendOk(java.io.OutputStream out)
SendsOK
ACK codestatic <O extends java.io.OutputStream>
OsendWarning(O out, java.lang.String message)
java.lang.String
toString()
void
validateCommandStatusCode(java.lang.String command, java.lang.Object location)
-
-
-
Field Detail
-
OK
public static final int OK
- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
statusCode
private final int statusCode
-
line
private final java.lang.String line
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
-
getLine
public java.lang.String getLine()
-
send
public <O extends java.io.OutputStream> O send(O out) throws java.io.IOException
- Throws:
java.io.IOException
-
validateCommandStatusCode
public void validateCommandStatusCode(java.lang.String command, java.lang.Object location) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readAck
public static ScpAckInfo readAck(java.io.InputStream in, boolean canEof) throws java.io.IOException
- Throws:
java.io.IOException
-
sendOk
public static void sendOk(java.io.OutputStream out) throws java.io.IOException
SendsOK
ACK code- Parameters:
out
- The targetOutputStream
- Throws:
java.io.IOException
- If failed to send the ACK code
-
sendWarning
public static <O extends java.io.OutputStream> O sendWarning(O out, java.lang.String message) throws java.io.IOException
- Throws:
java.io.IOException
-
sendError
public static <O extends java.io.OutputStream> O sendError(O out, java.lang.String message) throws java.io.IOException
- Throws:
java.io.IOException
-
sendAck
public static <O extends java.io.OutputStream> O sendAck(O out, int level, java.lang.String message) throws java.io.IOException
- Throws:
java.io.IOException
-
-