com.strongloop.android.loopback

## Class Container

- java.lang.Object
- - com.strongloop.android.remoting.VirtualObject
  - - com.strongloop.android.loopback.Container

    public class Container
    extends VirtualObject

### Constructor Summary

Constructors
Constructor and Description
`Container()`

### Method Summary

Methods
`File` `createFileObject(java.lang.String name)` Create a new File object associated with this container.
`void` `getAllFiles(ListCallback<File> callback)` List all files in the container.
`void` `getFile(java.lang.String fileName, ObjectCallback<File> callback)` Get data of a File object.
`FileRepository` `getFileRepository()`
`java.lang.String` `getName()`
`void` `setName(java.lang.String name)`
`void` `upload(java.io.File file, ObjectCallback<File> callback)` Upload a new file
`void` `upload(java.lang.String fileName, byte[] content, java.lang.String contentType, ObjectCallback<File> callback)` Upload a new file

### Methods inherited from class com.strongloop.android.remoting.VirtualObject

`getCreationParameters, getRepository, invokeMethod, invokeMethod, setCreationParameters, setRepository, toMap`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Container

    public Container()

### Method Detail

#### setName

    public void setName(java.lang.String name)

#### getName

    public java.lang.String getName()

#### upload

    public void upload(java.io.File file,
              ObjectCallback<File> callback)

Upload a new file

Parameters:
  `file` - Content of the file.
  `callback` - The callback to be executed when finished.

#### upload

    public void upload(java.lang.String fileName,
              byte[] content,
              java.lang.String contentType,
              ObjectCallback<File> callback)

Upload a new file

Parameters:
  `fileName` - The file name, must be unique within the container.
  `content` - Content of the file.
  `contentType` - Content type (optional).
  `callback` - The callback to be executed when finished.

#### createFileObject

    public File createFileObject(java.lang.String name)

Create a new File object associated with this container.

Parameters:
  `name` - The name of the file.
Returns:
  the object created

#### getFile

    public void getFile(java.lang.String fileName,
               ObjectCallback<File> callback)

Get data of a File object.

Parameters:
  `fileName` - The name of the file.
  `callback` - The callback to be executed when finished.

#### getAllFiles

    public void getAllFiles(ListCallback<File> callback)

List all files in the container.

Parameters:
  `callback` - The callback to be executed when finished.

#### getFileRepository

    public FileRepository getFileRepository()