@Override
    public void write(Writer writer) {
        try {
            writer.write("HTTP/1.1 200 OK" + System.lineSeparator());
            writer.write("Server: Java HTTP Server 1.0" + System.lineSeparator());
            writer.write("Content-type: text/html" + System.lineSeparator());
            writer.write("Content-length: " + data.length + System.lineSeparator());
            writer.write("Connection: close" + System.lineSeparator());
            writer.write(System.lineSeparator());
            writer.write(new String(data));
            writer.flush();
        }
        catch (IOException exception) {

        }
    }