Class 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, java.nio.charset.Charset cs, boolean canEof)  
      <O extends java.io.OutputStream>
      O
      send​(O out, java.nio.charset.Charset cs)  
      static <O extends java.io.OutputStream>
      O
      sendAck​(O out, java.nio.charset.Charset cs, int level, java.lang.String message)  
      static <O extends java.io.OutputStream>
      O
      sendError​(O out, java.nio.charset.Charset cs, java.lang.String message)  
      static void sendOk​(java.io.OutputStream out, java.nio.charset.Charset cs)
      Sends OK ACK code
      static <O extends java.io.OutputStream>
      O
      sendWarning​(O out, java.nio.charset.Charset cs, java.lang.String message)  
      java.lang.String toString()  
      void validateCommandStatusCode​(java.lang.String command, java.lang.Object location)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ScpAckInfo

        public ScpAckInfo​(int statusCode)
      • ScpAckInfo

        public ScpAckInfo​(int statusCode,
                          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:
        toString in class java.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.IOException
        Sends OK ACK code
        Parameters:
        out - The target OutputStream
        cs - The Charset to 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