/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.iZpl;

import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import java.io.IOException;
import java.io.OutputStream;

/**
 *
 * @author LH
 */
public class ReInitializer implements HttpHandler
{
    @Override
    public void handle(HttpExchange t) throws IOException
    {
       String response = PlProcessor.failRSP;
       t.sendResponseHeaders(200, response.length());
        Headers responseHeaders = t.getResponseHeaders();
        responseHeaders.set("Content-Type", "audio/x-mpegurl");

        OutputStream os = t.getResponseBody();
        os.write(response.getBytes());
        os.close();
    }
    
}
