You have to stream the bytes back to the browser along with a content-type of application/pdf and choose a method of rendering it (inline or attachment).
For example:
byte[] content = getByteArray();
try {
ServletOutputStream outputStream = response.getOutputStream();
response.setContentType("application/pdf");
response.setHeader("Content-disposition","inline; filename=Example.pdf" );
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
BufferedOutputStream bos = new BufferedOutputStream(outputStream);
bos.write(content);
bos.close();
} catch (Exception e) {
e.printStackTrace();
}