Home
last modified time | relevance | path

Searched refs:DownloadMetadata (Results 1 – 8 of 8) sorted by relevance

/external/downloader/src/test/java/com/google/android/downloader/
DSimpleFileDownloadDestinationTest.java75 DownloadMetadata metadata = downloadDestination.readMetadata(); in metadata_fileDoesNotExist()
76 assertThat(metadata).isEqualTo(DownloadMetadata.create()); in metadata_fileDoesNotExist()
86 DownloadMetadata metadata = downloadDestination.readMetadata(); in metadata_fileEmpty()
87 assertThat(metadata).isEqualTo(DownloadMetadata.create()); in metadata_fileEmpty()
98 DownloadMetadata metadata = downloadDestination.readMetadata(); in metadata_fileNonEmpty()
99 assertThat(metadata).isEqualTo(DownloadMetadata.create()); in metadata_fileNonEmpty()
110 () -> downloadDestination.openByteChannel(0L, DownloadMetadata.create())); in openByteChannel_fileDoesNotExist()
122 downloadDestination.openByteChannel(0L, DownloadMetadata.create()); in openByteChannel_fileEmpty()
141 downloadDestination.openByteChannel(targetFile.length(), DownloadMetadata.create()); in openByteChannel_fileNonEmpty()
159 .openByteChannel(0L, DownloadMetadata.create(contentTag, lastModifiedTimeSeconds)) in openByteChannel_metadata()
[all …]
DProtoFileDownloadDestinationTest.java75 DownloadMetadata metadata = downloadDestination.readMetadata(); in metadata_fileDoesNotExist()
76 assertThat(metadata).isEqualTo(DownloadMetadata.create()); in metadata_fileDoesNotExist()
86 DownloadMetadata metadata = downloadDestination.readMetadata(); in metadata_fileEmpty()
87 assertThat(metadata).isEqualTo(DownloadMetadata.create()); in metadata_fileEmpty()
98 DownloadMetadata metadata = downloadDestination.readMetadata(); in metadata_fileNonEmpty()
99 assertThat(metadata).isEqualTo(DownloadMetadata.create()); in metadata_fileNonEmpty()
110 () -> downloadDestination.openByteChannel(0L, DownloadMetadata.create())); in openByteChannel_fileDoesNotExist()
122 downloadDestination.openByteChannel(0L, DownloadMetadata.create()); in openByteChannel_fileEmpty()
141 downloadDestination.openByteChannel(targetFile.length(), DownloadMetadata.create()); in openByteChannel_fileNonEmpty()
159 .openByteChannel(0L, DownloadMetadata.create(contentTag, lastModifiedTimeSeconds)) in openByteChannel_metadata()
[all …]
DDownloaderTest.java157 DownloadMetadata metadata = destination.readMetadata(); in downloadOneFile()
158 assertThat(metadata).isEqualTo(DownloadMetadata.create(contentTag, lastModifiedTimeSeconds)); in downloadOneFile()
225 destination.openByteChannel(0L, DownloadMetadata.create(contentTag, 0L)).close(); in downloadOneFile_existingContent_withEtag()
253 .openByteChannel(0L, DownloadMetadata.create("", lastModifiedTimestampSeconds)) in downloadOneFile_existingContent_withLastModified()
/external/downloader/src/main/java/com/google/android/downloader/
DProtoFileDownloadDestination.java49 public DownloadMetadata readMetadata() throws IOException { in readMetadata()
52 : DownloadMetadata.create(); in readMetadata()
56 public WritableByteChannel openByteChannel(long offsetBytes, DownloadMetadata metadata) in openByteChannel()
80 private static DownloadMetadata readMetadataFromBytes(byte[] bytes) throws IOException { in readMetadataFromBytes()
82 return DownloadMetadata.create(proto.getContentTag(), proto.getLastModifiedTimeSeconds()); in readMetadataFromBytes()
85 private static byte[] writeMetadataToBytes(DownloadMetadata metadata) { in writeMetadataToBytes()
DSimpleFileDownloadDestination.java53 public DownloadMetadata readMetadata() throws IOException { in readMetadata()
56 : DownloadMetadata.create(); in readMetadata()
60 public WritableByteChannel openByteChannel(long offsetBytes, DownloadMetadata metadata) in openByteChannel()
84 private static DownloadMetadata readMetadataFromBytes(byte[] bytes) throws IOException { in readMetadataFromBytes()
89 return DownloadMetadata.create(etag, lastModifiedTimeSeconds); in readMetadataFromBytes()
93 private static byte[] writeMetadataToBytes(DownloadMetadata metadata) throws IOException { in writeMetadataToBytes()
DDownloadMetadata.java26 public abstract class DownloadMetadata { class
37 public static DownloadMetadata create() { in create()
45 public static DownloadMetadata create(String contentTag, long lastModifiedTimeSeconds) { in create()
DDownloadDestination.java44 DownloadMetadata readMetadata() throws IOException; in readMetadata()
61 WritableByteChannel openByteChannel(long byteOffset, DownloadMetadata metadata) in openByteChannel()
DDownloader.java633 DownloadMetadata destinationMetadata = request.destination().readMetadata(); in runRequest()
809 private static DownloadMetadata parseResponseMetadata(UrlResponse response) in parseResponseMetadata()
813 return DownloadMetadata.create(contentTag, lastModifiedTimeSeconds); in parseResponseMetadata()