MtpStorageInfo
  public
  
  final
  
  class
  MtpStorageInfo
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.mtp.MtpStorageInfo | 
This class encapsulates information about a storage unit on an MTP device. This corresponds to the StorageInfo Dataset described in section 5.2.2 of the MTP specification.
Summary
Public methods | |
|---|---|
        
        
        
        
        
        String
     | 
  
    
      
      getDescription()
      
      
        Returns the description string for the storage unit.  | 
  
        
        
        
        
        
        long
     | 
  
    
      
      getFreeSpace()
      
      
        Returns the amount of free space in the storage unit in bytes  | 
  
        
        
        
        
        
        long
     | 
  
    
      
      getMaxCapacity()
      
      
        Returns the maximum storage capacity for the storage unit in bytes  | 
  
        
        
        
        
        
        int
     | 
  
    
      
      getStorageId()
      
      
        Returns the storage ID for the storage unit.  | 
  
        
        
        
        
        
        String
     | 
  
    
      
      getVolumeIdentifier()
      
      
        Returns the volume identifier for the storage unit  | 
  
Inherited methods | |
|---|---|
Public methods
getDescription
public String getDescription ()
Returns the description string for the storage unit. This is typically displayed to the user in the user interface on the MTP host.
| Returns | |
|---|---|
String | 
        the storage unit description
 This value cannot be null. | 
      
getFreeSpace
public long getFreeSpace ()
Returns the amount of free space in the storage unit in bytes
| Returns | |
|---|---|
long | 
        the amount of free space | 
getMaxCapacity
public long getMaxCapacity ()
Returns the maximum storage capacity for the storage unit in bytes
| Returns | |
|---|---|
long | 
        the maximum capacity | 
getStorageId
public int getStorageId ()
Returns the storage ID for the storage unit. The storage ID uniquely identifies the storage unit on the MTP device.
| Returns | |
|---|---|
int | 
        the storage ID | 
getVolumeIdentifier
public String getVolumeIdentifier ()
Returns the volume identifier for the storage unit
| Returns | |
|---|---|
String | 
        the storage volume identifier
 This value cannot be null. |