/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/openers/ |
D | StreamMutationOpener.java | 87 public Mutator open(OpenContext openContext) throws IOException { in open() argument 88 return new Mutator(openContext, locking, behaviors); in open() 94 private final OpenContext openContext; field in StreamMutationOpener.Mutator 99 OpenContext openContext, @Nullable LockFileOpener locking, @Nullable Behavior[] behaviors) in Mutator() argument 101 this.openContext = openContext; in Mutator() 104 lock = locking.open(openContext); in Mutator() 114 try (InputStream backendIn = openForReadOrEmpty(openContext.encodedUri()); in mutate() 115 InputStream in = openContext.chainTransformsForRead(backendIn).get(0)) { in mutate() 116 Uri tempUri = ScratchFile.scratchUri(openContext.originalUri()); in mutate() 118 try (OutputStream backendOut = openContext.backend().openForWrite(tempUri)) { in mutate() [all …]
|
D | LockFileOpener.java | 98 public Closeable open(OpenContext openContext) throws IOException { in open() argument 101 openContext in open() 104 .path(openContext.encodedUri().getPath() + LOCK_SUFFIX) in open() 109 ReleasableResource.create(openThreadLock(openContext, lockUri))) { in open() 115 ReleasableResource.create(openStreamForLocking(openContext, lockUri)); in open() 117 ReleasableResource.create(openFileLock(openContext, streamResource.get()))) { in open() 141 private Closeable openThreadLock(OpenContext openContext, Uri lockUri) throws IOException { in openThreadLock() argument 143 return openContext.backend().lockScope().tryThreadLock(lockUri); in openThreadLock() 145 return openContext.backend().lockScope().threadLock(lockUri); in openThreadLock() 150 private Closeable openStreamForLocking(OpenContext openContext, Uri lockUri) throws IOException { in openStreamForLocking() argument [all …]
|
D | SystemLibraryOpener.java | 68 public Void open(OpenContext openContext) throws IOException { in open() argument 72 file = ReadFileOpener.create().open(openContext); in open() 81 .appendPath(hashedLibraryName(openContext.originalUri())) in open() 84 file = openContext.storage().open(cachedUri, ReadFileOpener.create()); in open() 89 openContext.storage().open(openContext.originalUri(), ReadStreamOpener.create()); in open() 90 OutputStream to = openContext.storage().open(cachedUri, WriteStreamOpener.create())) { in open() 94 file = openContext.storage().open(cachedUri, ReadFileOpener.create()); in open()
|
D | WriteProtoOpener.java | 54 public Void open(OpenContext openContext) throws IOException { in open() argument 55 Uri tempUri = ScratchFile.scratchUri(openContext.encodedUri()); in open() 56 OutputStream backendOutput = openContext.backend().openForWrite(tempUri); in open() 57 List<OutputStream> chain = openContext.chainTransformsForWrite(backendOutput); in open() 72 openContext.backend().deleteFile(tempUri); in open() 81 openContext.backend().rename(tempUri, openContext.encodedUri()); in open()
|
D | ParcelFileDescriptorOpener.java | 41 public ParcelFileDescriptor open(OpenContext openContext) throws IOException { in open() argument 42 Pair<Uri, Closeable> result = openContext.backend().openForNativeRead(openContext.encodedUri()); in open() 44 if (openContext.hasTransforms()) { in open() 47 + openContext.originalUri()); in open()
|
D | ReadByteArrayOpener.java | 48 public byte[] open(OpenContext openContext) throws IOException { in open() argument 49 try (InputStream in = ReadStreamOpener.create().open(openContext)) { in open() 61 if (size == null && !openContext.hasTransforms()) { in open() 63 long fileSize = openContext.storage().fileSize(openContext.originalUri()); in open()
|
D | NativeReadOpener.java | 49 public CloseableUri open(OpenContext openContext) throws IOException { in open() argument 50 Pair<Uri, Closeable> result = openContext.backend().openForNativeRead(openContext.encodedUri()); in open() 55 .encodedFragment(openContext.originalUri().getEncodedFragment()) in open()
|
D | AppendStreamOpener.java | 48 public OutputStream open(OpenContext openContext) throws IOException { in open() argument 49 OutputStream backendOutput = openContext.backend().openForAppend(openContext.encodedUri()); in open() 50 List<OutputStream> chain = openContext.chainTransformsForAppend(backendOutput); in open()
|
D | WriteStreamOpener.java | 46 public OutputStream open(OpenContext openContext) throws IOException { in open() argument 47 OutputStream backendOutput = openContext.backend().openForWrite(openContext.encodedUri()); in open() 48 List<OutputStream> chain = openContext.chainTransformsForWrite(backendOutput); in open()
|
D | ReadStreamOpener.java | 60 public InputStream open(OpenContext openContext) throws IOException { in open() argument 61 InputStream backendInput = openContext.backend().openForRead(openContext.encodedUri()); in open() 65 List<InputStream> chain = openContext.chainTransformsForRead(backendInput); in open()
|
D | ReadFileOpener.java | 111 public File open(OpenContext openContext) throws IOException { in open() argument 113 if (openContext.hasTransforms()) { in open() 116 return openContext.backend().toFile(openContext.encodedUri()); in open() 120 ReleasableResource.create(ReadStreamOpener.create().open(openContext))) { in open()
|
D | RandomAccessFileOpener.java | 51 public RandomAccessFile open(OpenContext openContext) throws IOException { in open() argument 54 File file = readFileOpener.open(openContext); in open() 59 File file = readFileOpener.open(openContext); in open()
|
D | MappedByteBufferOpener.java | 47 public MappedByteBuffer open(OpenContext openContext) throws IOException { in open() argument 49 try (InputStream stream = ReadStreamOpener.create().open(openContext)) { in open() 55 "URI not convertible to FileChannel for mapping: " + openContext.originalUri()); in open()
|
D | IntegrityUriComputingOpener.java | 45 public Uri open(OpenContext openContext) throws IOException { in open() argument 46 Uri uri = openContext.originalUri(); in open() 51 openContext.storage().open(uri, ReadStreamOpener.create().withBehaviors(uriComputer))) { in open()
|
D | RecursiveDeleteOpener.java | 67 public Void open(OpenContext openContext) throws IOException { in open() argument 69 deleteRecursively(openContext.storage(), openContext.encodedUri(), exceptions); in open()
|
D | AssetFileDescriptorOpener.java | 39 public AssetFileDescriptor open(OpenContext openContext) throws IOException { in open() argument 41 ParcelFileDescriptor pfd = pfdOpener.open(openContext); in open()
|
D | ReadStringOpener.java | 42 public String open(OpenContext openContext) throws IOException { in open() argument 43 byte[] bytes = ReadByteArrayOpener.create().open(openContext); in open()
|
D | WriteByteArrayOpener.java | 53 public Void open(OpenContext openContext) throws IOException { in open() argument 54 try (OutputStream out = WriteStreamOpener.create().withBehaviors(behaviors).open(openContext)) { in open()
|
D | WriteStringOpener.java | 53 public Void open(OpenContext openContext) throws IOException { in open() argument 56 .open(openContext); in open()
|
D | ReadProtoOpener.java | 71 public T open(OpenContext openContext) throws IOException { in open() argument 72 try (InputStream in = ReadStreamOpener.create().open(openContext)) { in open()
|
D | WriteFileOpener.java | 161 public FileCloser open(OpenContext openContext) throws IOException { in open() argument 163 ReleasableResource.create(WriteStreamOpener.create().open(openContext))) { in open()
|
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/integration/downloader/ |
D | DownloadDestinationOpener.java | 167 public DownloadDestination open(OpenContext openContext) throws IOException { in open() argument 168 if (openContext.hasTransforms()) { in open() 170 "Transforms are not supported by this Opener: " + openContext.originalUri()); in open() 174 if (openContext.storage().isDirectory(openContext.originalUri())) { in open() 180 openContext.originalUri(), openContext.storage(), metadataStore); in open()
|
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/internal/downloader/ |
D | ZipFolderOpener.java | 50 public Void open(OpenContext openContext) throws IOException { in open() argument 51 SynchronousFileStorage fileStorage = openContext.storage(); in open() 53 new ZipInputStream(ReadStreamOpener.create().withBufferedIo().open(openContext))) { in open()
|
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/ |
D | Opener.java | 32 T open(OpenContext openContext) throws IOException; in open() argument
|