Example usage for java.io PrintWriter write

List of usage examples for java.io PrintWriter write

Introduction

In this page you can find the example usage for java.io PrintWriter write.

Prototype

public void write(String s) 

Source Link

Document

Writes a string.

Usage

From source file:com.hp.avmon.kpigetconfig.web.KpigetconfigAgentController.java

@RequestMapping(value = "/findIloHostGridInfo")
public void findIloHostGridInfo(HttpServletRequest request, PrintWriter writer) {
    Map map = null;/*w  ww  .jav a 2 s . co m*/
    try {
        map = agentManageService.findIloHostGridInfo(request);
        String jsonData = JackJson.fromObjectToJson(map);
        logger.debug("ilo host grid===" + jsonData);
        writer.write(jsonData);
        writer.flush();
        writer.close();
    } catch (Exception e) {
        e.printStackTrace();
        logger.error(this.getClass().getName() + " findIloHostGridInfo", e);
    }
}