Out of memory auf einem byte-Zuordnung (Bitmap als String an den webservice mit soap)

Bin eine bitmap , so dass ich hochladen will-ein webserivceas string und wollen ermittelt werden, die string.

Für die Umwandlung von bitmap-string benutze:

ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();

strBase64 = Base64.encodeToString(byteArray, Base64.URL_SAFE);

diese oben String als Eigenschaft in soapobject hochladen.

Aber bin immer Out of memory on a 11674900-byte allocation, während der Druck und hochladen.

Und wenn ich Debuggen das Problem, ohne Druck bin immer

com.sun.jdi.InvocationException occurred invoking method.

auf soaprequest.

Wie dieses Problem zu beheben und zu upload image zu webservice als string ?

InformationsquelleAutor Udaykiran | 2011-11-10

Schreibe einen Kommentar