Package org.bgerp.model.file

# Class FileData

java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
org.bgerp.model.file.FileData

All Implemented Interfaces:
  `Serializable`, `Id<Integer>`, `IdTitle<Integer>`, `Title`

public class FileData extends IdTitle
DB table entity with file metadata: ID, title, upload time. Files themselves are persisted in filestorage directory.

See Also:
  - `FileDataDAO`
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class org.bgerp.model.base.IdTitle

  `title`

  ### Fields inherited from class org.bgerp.model.base.Id

  `id`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileData()`
  `FileData(int id, String title, String secret)`
  `FileData(String title, byte[] data)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `getData()`
  `OutputStream`
  `getOutputStream()`
  `String`
  `getSecret()`
  `Date`
  `getTime()`
  `static List<FileData>`
  `parse(String str)`
  `static String`
  `serialize(List<FileData> fileList)`
  `void`
  `setData(byte[] data)`
  `void`
  `setOutputStream(OutputStream outputStream)`
  `void`
  `setSecret(String key)`
  `void`
  `setTime(Date time)`

  ### Methods inherited from class org.bgerp.model.base.IdTitle

  `getTitle, setTitle, toString, unknown`

  ### Methods inherited from class org.bgerp.model.base.Id

  `equals, getId, hashCode, setId`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.bgerp.model.base.iface.Id

  `getId`

- ## Constructor Details

  - ### FileData

    public FileData()

  - ### FileData

    public FileData(int id, String title, String secret)

  - ### FileData

    public FileData(String title, byte[] data)

- ## Method Details

  - ### getSecret

    public String getSecret()

  - ### setSecret

    public void setSecret(String key)

  - ### getTime

    public Date getTime()

  - ### setTime

    public void setTime(Date time)

  - ### getData

    public byte[] getData()

  - ### setData

    public void setData(byte[] data)

  - ### getOutputStream

    public OutputStream getOutputStream()
    Returns:
      output stream to the stored file.

  - ### setOutputStream

    public void setOutputStream(OutputStream outputStream)

  - ### serialize

    public static String serialize(List<FileData> fileList)

  - ### parse

    public static List<FileData> parse(String str)