code: public static AsyncInputStream toAsyncInputStream(final ByteBuffer srcByteBuffer) {
          notNull("srcByteBuffer", srcByteBuffer);
          return new AsyncInputStream() {
              @Override
              public void read(final ByteBuffer dstByteBuffer, final SingleResultCallback<Integer> callback) {
                  transferDataFromByteBuffers(srcByteBuffer, dstByteBuffer, callback);
              }
  
              @Override
              public void skip(final long bytesToSkip, final SingleResultCallback<Long> callback) {
                  notNull("callback", callback);
                  callback.onResult(0L, null);
              }
  
              @Override
              public void close(final SingleResultCallback<Void> callback) {
                  callback.onResult(null, null);
              }
          };
      }
docs: Converts a {@link ByteBuffer} into a {@link AsyncInputStream}
  
  @param srcByteBuffer the data source
  @return the AsyncInputStream