Searched refs:DownloadMetadata (Results 1 – 8 of 8) sorted by relevance
/external/downloader/src/test/java/com/google/android/downloader/ |
D | SimpleFileDownloadDestinationTest.java | 75 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 …]
|
D | ProtoFileDownloadDestinationTest.java | 75 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 …]
|
D | DownloaderTest.java | 157 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/ |
D | ProtoFileDownloadDestination.java | 49 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()
|
D | SimpleFileDownloadDestination.java | 53 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()
|
D | DownloadMetadata.java | 26 public abstract class DownloadMetadata { class 37 public static DownloadMetadata create() { in create() 45 public static DownloadMetadata create(String contentTag, long lastModifiedTimeSeconds) { in create()
|
D | DownloadDestination.java | 44 DownloadMetadata readMetadata() throws IOException; in readMetadata() 61 WritableByteChannel openByteChannel(long byteOffset, DownloadMetadata metadata) in openByteChannel()
|
D | Downloader.java | 633 DownloadMetadata destinationMetadata = request.destination().readMetadata(); in runRequest() 809 private static DownloadMetadata parseResponseMetadata(UrlResponse response) in parseResponseMetadata() 813 return DownloadMetadata.create(contentTag, lastModifiedTimeSeconds); in parseResponseMetadata()
|