BlobStoreManager.Session.OpenWrite(Int64, Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Opens a file descriptor to write a blob into the session.
[Android.Runtime.Register("openWrite", "(JJ)Landroid/os/ParcelFileDescriptor;", "GetOpenWrite_JJHandler", ApiSince=30)]
public virtual Android.OS.ParcelFileDescriptor OpenWrite (long offsetBytes, long lengthBytes);
[<Android.Runtime.Register("openWrite", "(JJ)Landroid/os/ParcelFileDescriptor;", "GetOpenWrite_JJHandler", ApiSince=30)>]
abstract member OpenWrite : int64 * int64 -> Android.OS.ParcelFileDescriptor
override this.OpenWrite : int64 * int64 -> Android.OS.ParcelFileDescriptor
Parameters
- offsetBytes
- Int64
offset into the file to begin writing at, or 0 to start at the beginning of the file.
- lengthBytes
- Int64
total size of the file being written, used to preallocate the underlying disk space, or -1 if unknown. The system may clear various caches as needed to allocate this space.
Returns
a ParcelFileDescriptor
for writing to the blob file.
- Attributes
Remarks
Opens a file descriptor to write a blob into the session.
The returned file descriptor will start writing data at the requested offset in the underlying file, which can be used to resume a partially written file. If a valid file length is specified, the system will preallocate the underlying disk space to optimize placement on disk. It is strongly recommended to provide a valid file length when known.
Java documentation for android.app.blob.BlobStoreManager.Session.openWrite(long, long)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.