Interface Container


public interface Container
A container of blobs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if the blob identified by this name exists within this container.
    void
    Creates the underlying, physical container.
    boolean
    Returns true if the underlying, physical container exists.
    Gets a reference to a blob with the given name.
    Gets the reference for this container.
    Returns all blobs stored in this container.
  • Method Details

    • getReference

      Reference getReference()
      Gets the reference for this container.
      Returns:
      the reference
    • getBlob

      Blob getBlob(String name)
      Gets a reference to a blob with the given name.
      Parameters:
      name - the blob name
      Returns:
      the blob reference
    • create

      void create() throws IOException
      Creates the underlying, physical container. Containers are automatically created when writing a blob, so an explicit call to create the container is not required.
      Throws:
      IOException - if an I/O error occurred
    • exists

      boolean exists() throws IOException
      Returns true if the underlying, physical container exists.
      Returns:
      true if the container exists; false otherwise
      Throws:
      IOException - if an I/O error occurred
    • listBlobs

      List<Blob> listBlobs() throws IOException
      Returns all blobs stored in this container.
      Returns:
      the blobs in this container
      Throws:
      IOException - if an I/O error occurred
    • contains

      default boolean contains(String name) throws IOException
      Returns true if the blob identified by this name exists within this container.
      Parameters:
      name - the blob name
      Returns:
      true if the blob exists; false otherwise
      Throws:
      IOException - if an I/O error occurred