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

## javazoom.download
Class DownloadBean

    java.lang.Object
      javazoom.download.DownloadBean

All Implemented Interfaces:
  java.io.Serializable

public class DownloadBean
extends java.lang.Object
implements java.io.Serializable

This class allows to read FileInfo of downloaded files. It implements DownloadListener to get notified.

See Also:
  Serialized Form

Constructor Summary
`DownloadBean()`

Method Summary
`java.lang.String` | `encode(java.lang.String url)` Encode URL.
`Config` | `getConfig()` Return underlying Config.
`java.lang.String` | `getDownloadLink(java.lang.String filename)` Return encoded URL for download link.
`FileInfo` | `getFileInfo(java.lang.String filename)` Returns FileInfo instance for filename.
`int` | `getMaxDownload(java.lang.String filename)` Returns max number of downloads for filename.
`int` | `getTotalDownload(java.lang.String filename)` Returns download hits for filename.
`int` | `getTotalIncompleteDownload(java.lang.String filename)` Returns number of incomplete downloads for filename.
`java.lang.String` | `getVirtualPath()` Return virtual path.
`Config` | `registerFolderConfig(java.lang.String id, java.lang.String description, java.lang.String path, java.util.Properties props)` Register dynamically (without modifying folder.xml) a new FolderConfig.
`void` | `setConfig(Config cnf)` Set Config that applies to the downloadbean instance.
`void` | `setEncodeUrl(boolean b)` Enable/Disable URL encoding for download link.
`void` | `setStandardLink(boolean b)` Enable standard link.
`void` | `setVirtualPath(java.lang.String uri)` Set Virtual Path.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DownloadBean

    public DownloadBean()

Method Detail

### setConfig

    public void setConfig(Config cnf)

  Set Config that applies to the downloadbean instance.

  Parameters:
    `cnf` -

### getConfig

    public Config getConfig()

  Return underlying Config.

  Returns:

### getMaxDownload

    public int getMaxDownload(java.lang.String filename)

  Returns max number of downloads for filename.

  Parameters:
    `filename` - Input filename
  Returns:
    Download limit for the input filename.

### getTotalDownload

    public int getTotalDownload(java.lang.String filename)

  Returns download hits for filename.

  Parameters:
    `filename` - Input filename
  Returns:
    Download hits for the input filename.

### getTotalIncompleteDownload

    public int getTotalIncompleteDownload(java.lang.String filename)

  Returns number of incomplete downloads for filename.

  Parameters:
    `filename` - Input filename
  Returns:
    Incomplete downloads for the input filename.

### getFileInfo

    public FileInfo getFileInfo(java.lang.String filename)

  Returns FileInfo instance for filename.

  Parameters:
    `filename` - Input filename.
  Returns:
    FileInfo for input filename.

### setVirtualPath

    public void setVirtualPath(java.lang.String uri)

  Set Virtual Path.

  Parameters:
    `uri` -

### getVirtualPath

    public java.lang.String getVirtualPath()

  Return virtual path.

  Returns:

### setStandardLink

    public void setStandardLink(boolean b)

  Enable standard link. http://yourserver.com/download?name=yourfile.txt&id=uid otherwise link will be : http://yourserver.com/download/yourfile.txt?id=uid

  Parameters:
    `b` -

### setEncodeUrl

    public void setEncodeUrl(boolean b)

  Enable/Disable URL encoding for download link.

  Parameters:
    `b` -

### getDownloadLink

    public java.lang.String getDownloadLink(java.lang.String filename)

  Return encoded URL for download link.

  Parameters:
    `filename` -
  Returns:

### encode

    public java.lang.String encode(java.lang.String url)

  Encode URL.

  Parameters:
    `url` -
  Returns:

### registerFolderConfig

    public Config registerFolderConfig(java.lang.String id,
                                       java.lang.String description,
                                       java.lang.String path,
                                       java.util.Properties props)

  Register dynamically (without modifying folder.xml) a new FolderConfig.

  Parameters:
    `id` - unique id that identify folder.
    `description` - description of the folder.
    `path` - full directory path.
    `props` - optional properties.

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