Package jade.mtp.http

Class HTTPIO


  • public class HTTPIO
    extends Object
    • Constructor Detail

      • HTTPIO

        public HTTPIO()
    • Method Detail

      • writeAll

        public static void writeAll​(OutputStream output,
                                    byte[] message)
                             throws IOException
        Write the message to the OutputStream associated to the Sender
        Throws:
        IOException
      • createHTTPResponse

        public static byte[] createHTTPResponse​(String msgCode,
                                                String type)
        Create a generic message of HTTP with the input msgCode and type of connection (close or Keep-Alive)
      • createHTTPHeader

        public static byte[] createHTTPHeader​(HTTPAddress host,
                                              int length,
                                              String policy,
                                              byte[] boundary,
                                              boolean proxy)
        Prepare the HTML header
      • createHTTPBody

        public static byte[] createHTTPBody​(Envelope env,
                                            byte[] boundary,
                                            byte[] payload)
        Prepare the HTML body