Beispiel #1
0
 private void buildMultipartEntity() {
   entity.addPart(FILE_PART_NAME, new FileBody(mFilePart));
   try {
     entity.addPart(STRING_PART_NAME, new StringBody(mStringPart));
   } catch (UnsupportedEncodingException e) {
     VolleyLog.e("UnsupportedEncodingException");
   }
 }
Beispiel #2
0
  @Override
  public byte[] getBody() throws AuthFailureError {
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    try {
      entity.writeTo(bos);
    } catch (IOException e) {
      VolleyLog.e("IOException writing to ByteArrayOutputStream");
    }

    //   return bos.toByteArray();
    System.out.println("write entity:" + byteArrayGlobal.toString());
    return byteArrayGlobal;
  }
Beispiel #3
0
 @Override
 public String getBodyContentType() {
   System.out.println("entity.getContentType().getValue():" + entity.getContentType().getValue());
   return entity.getContentType().getValue();
 }