이 스레드는 당신을 도움이 될 것입니다 link는
아이디어는 요청의 헤더에있는 콘텐츠 범위 키워드를 사용하는 것입니다
샘플을 (당신이 연락하는 서버를 관리 할 수 있어야한다) 당신이에서 영감을 그릴 수있는 코드 :
public String readFirstChunk(String urlString, int byteCount) {
String text = null;
if (urlString != null) {
org.restlet.Client restletClient = new org.restlet.Client(Protocol.HTTP);
Request request = new Request(Method.GET, urlString);
List<Range> ranges = Collections.singletonList(new Range(0, byteCount));
request.setRanges(ranges);
Response response = restletClient.handle(request);
if (Status.SUCCESS_OK.equals(response.getStatus())) {
text = processSuccessfulChunkRequest(response);
} else if (Status.SUCCESS_PARTIAL_CONTENT .equals(response.getStatus())) {
text = processSuccessfulChunkRequest(response);
} else {
System.err.println("FAILED "+response.getStatus());
}
}
return text;
}
private String processSuccessfulChunkRequest(Response response) {
String text = null;
try {
text = response.getEntity().getText();
} catch (IOException e) {
throw new RuntimeException("Cannot download chunk", e);
}
return text;
}
오픈 소스 안드로이드 토런트 클라이언트를 검색하십시오. –