@Override protected void sendData(final OutputStream out) throws IOException {
  LOG.trace("enter sendData(OutputStream out)");
  if (lengthOfData() == 0) {
    LOG.debug("No data to send.");
    return;
  }
  final byte[] tmp=new byte[4096];
  final InputStream instream=source.createInputStream();
  try {
    int len;
    while ((len=instream.read(tmp)) >= 0) {
      out.write(tmp,0,len);
    }
  }
  finally {
    instream.close();
  }
}

@ Override protected void sendData ( final OutputStream out ) throws IOException { LOG . trace ( "enter sendData(OutputStream out)" ) ; if ( lengthOfData ( ) == 0 ) { LOG . debug ( "No data to send." ) ; return ; } final byte [ ] tmp = new byte [ 4096 ] ; final InputStream instream = source . createInputStream ( ) ; try { int len ; while ( ( len = instream . read ( tmp ) ) >= 0 ) { out . write ( tmp , 0 , len ) ; } } finally { instream . close ( ) ; } }
write the data in " source " to the specified stream .
