Why so complicated and why read the complete image into memory?
A much simpler solution:
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
sun.misc.BASE64Encoder enc = new sun.misc.BASE64Encoder();
enc.encode(new FileInputStream("/path/to/file.whatever"), response.getOutputStream());
}