[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - java.lang.ArrayIndexOutOfBoundsException: 8192 when write a
j2eebank
do-not-reply at jboss.com
Wed Jul 30 04:32:04 EDT 2008
Hi,
I'm trying to write a byte array to response.getOutputStream() but it throws java.lang.ArrayIndexOutOfBoundsException: 8192 .
My code is
byte[] excelBytes= new byte[docDTO().length];//DTO object with byte array
| System.arraycopy(docDTO.getDocument(), 0, excelBytes, 0,docDTO.getDocument().length);
| final int xlsBytesLen = excelBytes.length-1;
| response.setHeader("Content-Disposition","inline;filename=\"" + FileName + "\"");
| response.setContentLength(xlsBytesLen);
|
| // Send content to Browser
| response.getOutputStream().write(excelBytes, 0, xlsBytesLen);Any help would be appreciated.
Thanks,
Jik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167541#4167541
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167541
More information about the jboss-user
mailing list