private Response parseContent() throws IOException {
  HttpEntity entity=response.getEntity();
  ByteArrayPool mPool=new ByteArrayPool(4096);
  PoolingByteArrayOutputStream bytes=new PoolingByteArrayOutputStream(mPool,(int)entity.getContentLength());
  byte[] buffer=null;
  try {
    InputStream in=entity.getContent();
    if (in == null) {
    }
    buffer=mPool.getBuf(1024);
    int count;
    while ((count=in.read(buffer)) != -1) {
      bytes.write(buffer,0,count);
    }
    this.contentBytes=bytes.toByteArray();
  }
 catch (  IllegalStateException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      entity.consumeContent();
    }
 catch (    IOException e) {
    }
    mPool.returnBuf(buffer);
    try {
      bytes.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  if (this.charset == null || this.contentBytes == null) {
    throw new IOException();
  }
  try {
    this.contentString=new String(this.contentBytes,this.charset);
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
catch (  NullPointerException e) {
    e.printStackTrace();
  }
  return this;
}

private Response parseContent ( ) throws IOException { HttpEntity entity = response . getEntity ( ) ; ByteArrayPool mPool = new ByteArrayPool ( 4096 ) ; PoolingByteArrayOutputStream bytes = new PoolingByteArrayOutputStream ( mPool , ( int ) entity . getContentLength ( ) ) ; byte [ ] buffer = null ; try { InputStream in = entity . getContent ( ) ; if ( in == null ) { } buffer = mPool . getBuf ( 1024 ) ; int count ; while ( ( count = in . read ( buffer ) ) != - 1 ) { bytes . write ( buffer , 0 , count ) ; } this . contentBytes = bytes . toByteArray ( ) ; } catch ( IllegalStateException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { try { entity . consumeContent ( ) ; } catch ( IOException e ) { } mPool . returnBuf ( buffer ) ; try { bytes . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } if ( this . charset == null || this . contentBytes == null ) { throw new IOException ( ) ; } try { this . contentString = new String ( this . contentBytes , this . charset ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } catch ( NullPointerException e ) { e . printStackTrace ( ) ; } return this ; }
turn reponse content into byte array
