/**@class android.os.MemoryFile @extends java.lang.Object MemoryFile is a wrapper for the Linux ashmem driver. MemoryFiles are backed by shared memory, which can be optionally set to be purgeable. Purgeable files may have their contents reclaimed by the kernel in low memory conditions (only if allowPurging is set to true). After a file is purged, attempts to read or write the file will cause an IOException to be thrown. */ var MemoryFile = { /**Closes the memory file. If there are no other open references to the memory file, it will be deleted. */ close : function( ) {}, /**Returns the length of the memory file. @return {Number} file length. */ length : function( ) {}, /**Is memory file purging enabled? @return {Boolean} true if the file may be purged. */ isPurgingAllowed : function( ) {}, /**Enables or disables purging of the memory file. @param {Boolean} allowPurging true if the operating system can purge the contents of the file in low memory situations @return {Boolean} previous value of allowPurging */ allowPurging : function( ) {}, /**Creates a new InputStream for reading from the memory file. @return {Object {java.io.InputStream}} InputStream */ getInputStream : function( ) {}, /**Creates a new OutputStream for writing to the memory file. @return {Object {java.io.OutputStream}} OutputStream */ getOutputStream : function( ) {}, /**Reads bytes from the memory file. Will throw an IOException if the file has been purged. @param {Object {byte[]}} buffer byte array to read bytes into. @param {Number} srcOffset offset into the memory file to read from. @param {Number} destOffset offset into the byte array buffer to read into. @param {Number} count number of bytes to read. @return {Number} number of bytes read. @throws IOException if the memory file has been purged or deactivated. */ readBytes : function( ) {}, /**Write bytes to the memory file. Will throw an IOException if the file has been purged. @param {Object {byte[]}} buffer byte array to write bytes from. @param {Number} srcOffset offset into the byte array buffer to write from. @param {Number} destOffset offset into the memory file to write to. @param {Number} count number of bytes to write. @throws IOException if the memory file has been purged or deactivated. */ writeBytes : function( ) {}, /**Gets a FileDescriptor for the memory file. The returned file descriptor is not duplicated. @throws IOException If the memory file has been closed. @hide */ getFileDescriptor : function( ) {}, /**Returns the size of the memory file that the file descriptor refers to, or -1 if the file descriptor does not refer to a memory file. @throws IOException If <code>fd</code> is not a valid file descriptor. @hide */ getSize : function( ) {}, };