Class 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:
  • 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)