Class LocalFileData

java.lang.Object
org.teamapps.message.protocol.file.LocalFileData
All Implemented Interfaces:
FileData

public class LocalFileData
extends java.lang.Object
implements FileData
  • Constructor Summary

    Constructors
    Constructor Description
    LocalFileData​(java.lang.String fileName, long length, java.lang.String path)  
    LocalFileData​(java.lang.String fileName, long length, java.lang.String path, boolean encrypted, java.lang.String encryptionKey)  
  • Method Summary

    Modifier and Type Method Description
    void copyToFile​(java.io.File file)  
    java.io.File copyToTempFile()  
    java.lang.String getBasePath()  
    java.lang.String getDescriptor()  
    java.lang.String getEncryptionKey()  
    java.lang.String getFileName()  
    java.io.InputStream getInputStream()  
    long getLength()  
    FileDataType getType()  
    boolean isEncrypted()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.teamapps.message.protocol.file.FileData

    getFileExtension, toBytes
  • Constructor Details

    • LocalFileData

      public LocalFileData​(java.lang.String fileName, long length, java.lang.String path)
    • LocalFileData

      public LocalFileData​(java.lang.String fileName, long length, java.lang.String path, boolean encrypted, java.lang.String encryptionKey)
  • Method Details

    • getType

      public FileDataType getType()
      Specified by:
      getType in interface FileData
    • getFileName

      public java.lang.String getFileName()
      Specified by:
      getFileName in interface FileData
    • getLength

      public long getLength()
      Specified by:
      getLength in interface FileData
    • getInputStream

      public java.io.InputStream getInputStream() throws java.io.IOException
      Specified by:
      getInputStream in interface FileData
      Throws:
      java.io.IOException
    • getDescriptor

      public java.lang.String getDescriptor()
      Specified by:
      getDescriptor in interface FileData
    • isEncrypted

      public boolean isEncrypted()
      Specified by:
      isEncrypted in interface FileData
    • getEncryptionKey

      public java.lang.String getEncryptionKey()
      Specified by:
      getEncryptionKey in interface FileData
    • getBasePath

      public java.lang.String getBasePath()
      Specified by:
      getBasePath in interface FileData
    • copyToTempFile

      public java.io.File copyToTempFile() throws java.io.IOException
      Specified by:
      copyToTempFile in interface FileData
      Throws:
      java.io.IOException
    • copyToFile

      public void copyToFile​(java.io.File file) throws java.io.IOException
      Specified by:
      copyToFile in interface FileData
      Throws:
      java.io.IOException