Class FourLetterWordMain


  • @Public
    public class FourLetterWordMain
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger LOG  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      static java.lang.String send4LetterWord​(java.lang.String host, int port, java.lang.String cmd)
      Send the 4letterword
      static java.lang.String send4LetterWord​(java.lang.String host, int port, java.lang.String cmd, boolean secure)
      Send the 4letterword
      static java.lang.String send4LetterWord​(java.lang.String host, int port, java.lang.String cmd, boolean secure, int timeout)
      Send the 4letterword
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
    • Constructor Detail

      • FourLetterWordMain

        public FourLetterWordMain()
    • Method Detail

      • send4LetterWord

        public static java.lang.String send4LetterWord​(java.lang.String host,
                                                       int port,
                                                       java.lang.String cmd)
                                                throws java.io.IOException,
                                                       X509Exception.SSLContextException
        Send the 4letterword
        Parameters:
        host - the destination host
        port - the destination port
        cmd - the 4letterword
        Returns:
        server response
        Throws:
        java.io.IOException
        X509Exception.SSLContextException
      • send4LetterWord

        public static java.lang.String send4LetterWord​(java.lang.String host,
                                                       int port,
                                                       java.lang.String cmd,
                                                       boolean secure)
                                                throws java.io.IOException,
                                                       X509Exception.SSLContextException
        Send the 4letterword
        Parameters:
        host - the destination host
        port - the destination port
        cmd - the 4letterword
        secure - whether to use SSL
        Returns:
        server response
        Throws:
        java.io.IOException
        X509Exception.SSLContextException
      • send4LetterWord

        public static java.lang.String send4LetterWord​(java.lang.String host,
                                                       int port,
                                                       java.lang.String cmd,
                                                       boolean secure,
                                                       int timeout)
                                                throws java.io.IOException,
                                                       X509Exception.SSLContextException
        Send the 4letterword
        Parameters:
        host - the destination host
        port - the destination port
        cmd - the 4letterword
        secure - whether to use SSL
        timeout - in milliseconds, maximum time to wait while connecting/reading data
        Returns:
        server response
        Throws:
        java.io.IOException
        X509Exception.SSLContextException