private long readSourceAvailableBytes(HttpURLConnection connection, long offset, int responseCode) throws IOException {
        long contentLength = getContentLength(connection);
        return responseCode == HTTP_OK ? contentLength
                : responseCode == HTTP_PARTIAL ? contentLength + offset : sourceInfo.length;
    }
{@link Source} that uses http resource as source for {@link ProxyCache}.
VideoCache/src/main/java/com/yc/videocache/HttpUrlSource.java