public interface

MAMBackupDataInput

com.microsoft.intune.mam.client.app.backup.MAMBackupDataInput

Class Overview

MAM representation of a BackupDataInput. This must be used in place of BackupDataInput and provides all the same methods.

Summary

Public Methods
abstract BackupDataInput asBackupDataInput()
Return the underlying BackupDataInput.
abstract int getDataSize()
abstract String getKey()
abstract int readEntityData(byte[] data, int offset, int size)
abstract boolean readNextHeader()
abstract void skipEntityData()

Public Methods

public abstract BackupDataInput asBackupDataInput ()

Return the underlying BackupDataInput.

Returns
  • The underlying BackupDataInput.

public abstract int getDataSize ()

See getDataSize(). Report the size in bytes of data associated with the current entity in the restore stream from the underlying DataBackupInput.

Returns
  • Size of the data associated with the current entity.

public abstract String getKey ()

See getKey(). Reports the key associated with the current entity in the restore stream from the underlying DataBackupInput.

Returns
  • Key associated with the current entity.

public abstract int readEntityData (byte[] data, int offset, int size)

See readEntityData(byte[], int, int). Reads a record's raw data from the restore stream.

Parameters
data Raw data from the restore stream.
offset Offset within the data array at which the data will be placed.
size The number of bytes to read.
Returns
  • The number of bytes of data read.
Throws
IOException Thrown when an error occurs reading the restore data stream.

public abstract boolean readNextHeader ()

See readNextHeader(). Advances the file reader to the next backup entity to read. We intercept here and transparently handle restoring MAM Identities backed up.

Returns
  • Whether or not the underlying file was advanced
Throws
IOException If there are IOExceptions

public abstract void skipEntityData ()

See skipEntityData(). Consume the current entity's data without extracting it into a buffer.

Throws
IOException Thrown when an error occurs reading the restore data stream.