Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.syndication.propono.atom.client
Class ClientMediaEntry

    java.lang.Object
      com.sun.syndication.feed.atom.Entry
          com.sun.syndication.propono.atom.client.ClientEntry
              com.sun.syndication.propono.atom.client.ClientMediaEntry

All Implemented Interfaces:
  Extendable, Serializable, Cloneable

    public class ClientMediaEntry

extends ClientEntry

Client implementation of Atom media-link entry, an Atom entry that provides meta-data for a media file (e.g. uploaded image or audio file).

See Also:
  Serialized Form

Constructor Summary
`ClientMediaEntry(ClientAtomService service, ClientCollection collection)` Create ClientMedieEntry for service and collection.
`ClientMediaEntry(ClientAtomService service, ClientCollection collection, Entry entry, boolean partial)`
`ClientMediaEntry(ClientAtomService service, ClientCollection collection, String title, String slug, String contentType, byte[] bytes)`
`ClientMediaEntry(ClientAtomService service, ClientCollection collection, String title, String slug, String contentType, InputStream is)`

Method Summary
`InputStream` | `getAsStream()` Get media resource as an InputStream, should work regardless of whether you set the media resource data as an InputStream or as a byte array.
`byte[]` | `getBytes()` Get bytes of media resource associated with entry.
`InputStream` | `getInputStream()` Get input stream for media resource associated with this entry.
`String` | `getMediaLinkURI()` Get media link URI for editing the media resource associated with this entry via HTTP PUT or DELETE.
`String` | `getSlug()` Set string to be used in file name of new media resource on server.
`void` | `setBytes(byte[] bytes)` Set media resource data as a byte array, don't try this if you have already set the data as an InputStream.
`void` | `setInputStream(InputStream inputStream)` Set media resource data as an input stream, don't try this if you have already set the data as a byte array.
`void` | `setSlug(String slug)` Get string to be used in file name of new media resource on server.
`void` | `update()` Update entry on server.

Methods inherited from class com.sun.syndication.propono.atom.client.ClientEntry
`equals, getContent, getEditURI, remove, setContent, setContent`

Methods inherited from class com.sun.syndication.feed.atom.Entry
`clone, getAlternateLinks, getAuthors, getCategories, getContents, getContributors, getCreated, getForeignMarkup, getId, getIssued, getModified, getModule, getModules, getOtherLinks, getPublished, getRights, getSource, getSummary, getTitle, getTitleEx, getUpdated, getXmlBase, hashCode, isMediaEntry, setAlternateLinks, setAuthors, setCategories, setContents, setContributors, setCreated, setForeignMarkup, setId, setIssued, setModified, setModules, setOtherLinks, setPublished, setRights, setSource, setSummary, setTitle, setTitleEx, setUpdated, setXmlBase, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ClientMediaEntry

    public ClientMediaEntry(ClientAtomService service,
                            ClientCollection collection)

  Create ClientMedieEntry for service and collection.

### ClientMediaEntry

    public ClientMediaEntry(ClientAtomService service,
                            ClientCollection collection,
                            Entry entry,
                            boolean partial)
                     throws ProponoException

Throws:
  `ProponoException`

### ClientMediaEntry

    public ClientMediaEntry(ClientAtomService service,
                            ClientCollection collection,
                            String title,
                            String slug,
                            String contentType,
                            InputStream is)

### ClientMediaEntry

    public ClientMediaEntry(ClientAtomService service,
                            ClientCollection collection,
                            String title,
                            String slug,
                            String contentType,
                            byte[] bytes)

Method Detail

### getBytes

    public byte[] getBytes()

  Get bytes of media resource associated with entry.

  Returns:
    Bytes or null if none available or if entry uses an InputStream instead.

### setBytes

    public void setBytes(byte[] bytes)

  Set media resource data as a byte array, don't try this if you have already set the data as an InputStream.

### getInputStream

    public InputStream getInputStream()

  Get input stream for media resource associated with this entry.

  Returns:
    InputStream or null if none available or if entry uses bytes instead.

### setInputStream

    public void setInputStream(InputStream inputStream)

  Set media resource data as an input stream, don't try this if you have already set the data as a byte array.

### getMediaLinkURI

    public String getMediaLinkURI()

  Get media link URI for editing the media resource associated with this entry via HTTP PUT or DELETE.

### getAsStream

    public InputStream getAsStream()
                            throws ProponoException

  Get media resource as an InputStream, should work regardless of whether you set the media resource data as an InputStream or as a byte array.

  Throws:
    `ProponoException`

### update

    public void update()
                throws ProponoException

  Update entry on server.

  Overrides:
    `update` in class `ClientEntry`
  Throws:
    `ProponoException` - If entry is a "partial" entry.

### getSlug

    public String getSlug()

  Set string to be used in file name of new media resource on server.

### setSlug

    public void setSlug(String slug)

  Get string to be used in file name of new media resource on server.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD