Hi, I am trying to extract the text content of a text/plain email message. In the developer env it works fine but when deployed to google i see this error in the logs :
Error for /_ah/mail/d...@vikegames.appspotmail.com java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.io.ByteArrayOutputStream.write(Unknown Source) at javax.mail.internet.MimeMultipart.readTillFirstBoundary (MimeMultipart.java:245) at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:181) at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109) at br.com.ximp.vike.server.MailHandler.doPost(MailHandler.java:45) <<< My App Class I have tried the following codes to read the message ByteArrayInputStream, both with the same result: ATTEMPT 1: ByteArrayInputStream content = (ByteArrayInputStream) part.getContent (); BufferedReader reader = new BufferedReader(new InputStreamReader (content)); StringBuilder builder = new StringBuilder(); String line = null; while ( (line = reader.readLine()) != null){ builder.append(line); builder.append("\n"); }; String message = builder.toString(); ATTEMPT 2: ByteArrayInputStream content = (ByteArrayInputStream) part.getContent (); int length = content.available(); byte [] buff = new byte[length]; content.read(buff); String message = new String(buff); Am i doing something wrong? Any suggestions? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---