-
-
Save soulfly/1cd969e9364792802099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final int fileId = 2641910; | |
QBContent.downloadFileTask(fileId, new QBEntityCallbackImpl<InputStream>(){ | |
@Override | |
public void onSuccess(final InputStream inputStream, Bundle params) { | |
long length = params.getLong(Consts.CONTENT_LENGTH_TAG); | |
Log.i(TAG, "content.length: " + length); | |
Thread thread = new Thread() { | |
@Override | |
public void run() { | |
try { | |
while(true) { | |
byte[] data = ByteStreams.toByteArray(inputStream); | |
} | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
}; | |
thread.start(); | |
} | |
@Override | |
public void onError(List<String> errors) { | |
handleErrors(errors); | |
} | |
}, new QBProgressCallback() { | |
@Override | |
public void onProgressUpdate(int progress) { | |
Log.i(TAG, "progress: " + progress); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment