Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String createByeByeMessage() {

        /*
        NOTIFY * HTTP/1.1
        HOST: 239.255.255.250:1900
        NTS: ssdp:byebye
        USN: uuid:0b1f697a-a0fa-5181-010f-8edcc5a1a3e8::upnp:rootdevice
        NT: upnp:rootdevice
        CONTENT-LENGTH: 0
         */
        StringBuffer sb = new StringBuffer();

        sb.append("NOTIFY * HTTP/1.1").append("\n");
        sb.append("HOST: 239.255.255.250:1900").append("\n");
        sb.append("NTS: ssdp:byebye").append("\n");
        sb.append("USN: uuid:0b1f697a-a0fa-5181-010f-8edcc5a1a3e8::upnp:rootdevice").append("\n");
        sb.append("NT: upnp:rootdevice").append("\n");
        sb.append("CONTENT-LENGTH: 0").append("\n");

        return sb.toString();
    }
}