I want to convert image into byte[] and send it through servlet.
I have converted image to byte[] but send it to client ??
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String name=request.getParameter("name");
File f = new File("/Users/shilu/MyProject/Chat/Photo/" + name);
byte[] data = Files.readAllBytes(f.toPath());
//What to do now??
}