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 intERRORprivate java.lang.Stringlinestatic intOKstatic ScpAckInfoOK_ACK_INFOprivate intstatusCodestatic intWARNING
-
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.StringgetLine()intgetStatusCode()static ScpAckInforeadAck(java.io.InputStream in, java.nio.charset.Charset cs, boolean canEof)<O extends java.io.OutputStream>
Osend(O out, java.nio.charset.Charset cs)static <O extends java.io.OutputStream>
OsendAck(O out, java.nio.charset.Charset cs, int level, java.lang.String message)static <O extends java.io.OutputStream>
OsendError(O out, java.nio.charset.Charset cs, java.lang.String message)static voidsendOk(java.io.OutputStream out, java.nio.charset.Charset cs)SendsOKACK codestatic <O extends java.io.OutputStream>
OsendWarning(O out, java.nio.charset.Charset cs, java.lang.String message)java.lang.StringtoString()voidvalidateCommandStatusCode(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
-
OK_ACK_INFO
public static final ScpAckInfo OK_ACK_INFO
-
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, java.nio.charset.Charset cs) 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:
toStringin classjava.lang.Object
-
readAck
public static ScpAckInfo readAck(java.io.InputStream in, java.nio.charset.Charset cs, boolean canEof) throws java.io.IOException
- Throws:
java.io.IOException
-
sendOk
public static void sendOk(java.io.OutputStream out, java.nio.charset.Charset cs) throws java.io.IOExceptionSendsOKACK code- Parameters:
out- The targetOutputStreamcs- TheCharsetto use to write the textual data- Throws:
java.io.IOException- If failed to send the ACK code
-
sendWarning
public static <O extends java.io.OutputStream> O sendWarning(O out, java.nio.charset.Charset cs, 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.nio.charset.Charset cs, java.lang.String message) throws java.io.IOException- Throws:
java.io.IOException
-
sendAck
public static <O extends java.io.OutputStream> O sendAck(O out, java.nio.charset.Charset cs, int level, java.lang.String message) throws java.io.IOException- Throws:
java.io.IOException
-
-