Closed GoogleCodeExporter closed 9 years ago
I am not sure if we can fix this for when logging is enabled.
To log the content we have to store it in memory in a ByteArrayOutputStream
especially because we need to convert it back into an InputStream for content.
We cannot store only the content limit else when we convert it back into an
InputStream it will have missing information. Please advice, thank you.
Original comment by rmis...@google.com
on 19 Apr 2012 at 11:48
I'll take it. We can use FilteredInputStream and FilteredOutputStream.
Original comment by yan...@google.com
on 25 Apr 2012 at 10:34
http://codereview.appspot.com/6123059/
Original comment by yan...@google.com
on 26 Apr 2012 at 4:31
Original comment by yan...@google.com
on 27 Apr 2012 at 4:13
Hello. I use this api ver. 1.9.0. but the issue seems not resolved.
Please see followings.
java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216)
at
org.apache.harmony.luni.internal.net.www.protocol.http.RetryableOutputStream.wri
te(RetryableOutputStream.java:60)
at
com.google.api.client.http.AbstractInputStreamContent.copy(AbstractInputStreamCo
ntent.java:213)
at
com.google.api.client.http.AbstractInputStreamContent.writeTo(AbstractInputStrea
mContent.java:78)
at
com.google.api.client.http.MultipartRelatedContent.writeTo(MultipartRelatedConte
nt.java:124)
at
com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:81
)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:842)
this is occurred at...
private final HttpResponse execute(HttpRequest request) throws IOException {
prepare(request);
request.setContentLoggingLimit(0);
return request.execute(); <--HERE
}
above code is almost same to sample code.
am I wrong?
Original comment by soumi.ak...@gmail.com
on 30 May 2012 at 2:24
Original issue reported on code.google.com by
yan...@google.com
on 7 Apr 2012 at 12:42