1
0

DownloadCallback.java 758 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Copyright (C) 2008 Happy Fish / YuQing
  3. * <p>
  4. * FastDFS Java Client may be copied only under the terms of the GNU Lesser
  5. * General Public License (LGPL).
  6. * Please visit the FastDFS Home Page http://www.csource.org/ for more detail.
  7. */
  8. package com.kmall.common.fileserver.fastdfs;
  9. /**
  10. * Download file callback interface
  11. *
  12. * @author Happy Fish / YuQing
  13. * @version Version 1.4
  14. */
  15. public interface DownloadCallback {
  16. /**
  17. * recv file content callback function, may be called more than once when the file downloaded
  18. *
  19. * @param file_size file size
  20. * @param data data buff
  21. * @param bytes data bytes
  22. * @return 0 success, return none zero(errno) if fail
  23. */
  24. public int recv(long file_size, byte[] data, int bytes);
  25. }