Loading apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -67,9 +67,9 @@ import java.util.function.Consumer; * <pre class="prettyprint"> * final long sessionId = blobStoreManager.createSession(blobHandle); * try (BlobStoreManager.Session session = blobStoreManager.openSession(sessionId)) { * try (ParcelFileDescriptor pfd = new ParcelFileDescriptor.AutoCloseOutputStream( * try (OutputStream out = new ParcelFileDescriptor.AutoCloseOutputStream( * session.openWrite(offsetBytes, lengthBytes))) { * writeData(pfd); * writeData(out); * } * } * </pre> Loading Loading @@ -100,9 +100,9 @@ import java.util.function.Consumer; * <p> The following code snippet shows how to specify the access mode and commit the session: * <pre class="prettyprint"> * try (BlobStoreManager.Session session = blobStoreManager.openSession(sessionId)) { * try (ParcelFileDescriptor pfd = new ParcelFileDescriptor.AutoCloseOutputStream( * try (OutputStream out = new ParcelFileDescriptor.AutoCloseOutputStream( * session.openWrite(offsetBytes, lengthBytes))) { * writeData(pfd); * writeData(out); * } * session.allowSameSignatureAccess(); * session.allowPackageAccess(packageName, certificate); Loading Loading @@ -134,9 +134,9 @@ import java.util.function.Consumer; * * <p> The following code snippet shows how to access the data blob: * <pre class="prettyprint"> * try (ParcelFileDescriptor pfd = new ParcelFileDescriptor.AutoCloseInputStream( * try (InputStream in = new ParcelFileDescriptor.AutoCloseInputStream( * blobStoreManager.openBlob(blobHandle)) { * useData(pfd); * useData(in); * } * </pre> */ Loading Loading
apex/blobstore/framework/java/android/app/blob/BlobStoreManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -67,9 +67,9 @@ import java.util.function.Consumer; * <pre class="prettyprint"> * final long sessionId = blobStoreManager.createSession(blobHandle); * try (BlobStoreManager.Session session = blobStoreManager.openSession(sessionId)) { * try (ParcelFileDescriptor pfd = new ParcelFileDescriptor.AutoCloseOutputStream( * try (OutputStream out = new ParcelFileDescriptor.AutoCloseOutputStream( * session.openWrite(offsetBytes, lengthBytes))) { * writeData(pfd); * writeData(out); * } * } * </pre> Loading Loading @@ -100,9 +100,9 @@ import java.util.function.Consumer; * <p> The following code snippet shows how to specify the access mode and commit the session: * <pre class="prettyprint"> * try (BlobStoreManager.Session session = blobStoreManager.openSession(sessionId)) { * try (ParcelFileDescriptor pfd = new ParcelFileDescriptor.AutoCloseOutputStream( * try (OutputStream out = new ParcelFileDescriptor.AutoCloseOutputStream( * session.openWrite(offsetBytes, lengthBytes))) { * writeData(pfd); * writeData(out); * } * session.allowSameSignatureAccess(); * session.allowPackageAccess(packageName, certificate); Loading Loading @@ -134,9 +134,9 @@ import java.util.function.Consumer; * * <p> The following code snippet shows how to access the data blob: * <pre class="prettyprint"> * try (ParcelFileDescriptor pfd = new ParcelFileDescriptor.AutoCloseInputStream( * try (InputStream in = new ParcelFileDescriptor.AutoCloseInputStream( * blobStoreManager.openBlob(blobHandle)) { * useData(pfd); * useData(in); * } * </pre> */ Loading