koush/AndroidAsync — pull request #130 by erkasraim (2014-04-07 02:05:10+00:00)
Title: sendStream() in AsyncHttpServerResponse has control of stream data

In my case, I want to use sendSream()

1. Encrypt File read
2. Decrypt byte
3. Send byte

My Issue is second phase.

Solve,
1. Add DataInterceptCallback class
2. Add sendStream(InputStream inputStream, long totalLength, DataInterceptCallback dataInterceptCallback) method in AsyncHttpServerResponse class
3. Add pump(final InputStream is, final long max, final DataSink ds, final CompletedCallback callback, final DataInterceptCallback dataInterceptCallback) method in Util class