Method
onDataAvailable
(DataEmitter emitter, ByteBufferList bb)
Source from the content-addressed store, hash-verified
| 121 | public static void pump(final DataEmitter emitter, final DataSink sink, final CompletedCallback callback) { |
| 122 | final DataCallback dataCallback = new DataCallback() { |
| 123 | @Override |
| 124 | public void onDataAvailable(DataEmitter emitter, ByteBufferList bb) { |
| 125 | sink.write(bb); |
| 126 | if (bb.remaining() > 0) |
| 127 | emitter.pause(); |
| 128 | } |
| 129 | }; |
| 130 | emitter.setDataCallback(dataCallback); |
| 131 | sink.setWriteableCallback(new WritableCallback() { |
Callers
nothing calls this directly
Tested by
no test coverage detected