Class GenericFileData
java.lang.Object
org.teamapps.message.protocol.file.GenericFileData
- All Implemented Interfaces:
FileData
public class GenericFileData extends java.lang.Object implements FileData
-
Constructor Summary
Constructors Constructor Description GenericFileData(FileDataType type, java.lang.String fileName, long length, java.lang.String path)GenericFileData(FileDataType type, java.lang.String fileName, long length, java.lang.String path, boolean encrypted, java.lang.String encryptionKey) -
Method Summary
Modifier and Type Method Description voidcopyToFile(java.io.File file)java.io.FilecopyToTempFile()java.lang.StringgetBasePath()java.lang.StringgetDescriptor()java.lang.StringgetEncryptionKey()java.lang.StringgetFileName()java.io.InputStreamgetInputStream()longgetLength()FileDataTypegetType()booleanisEncrypted()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.teamapps.message.protocol.file.FileData
getFileExtension, toBytes
-
Constructor Details
-
GenericFileData
public GenericFileData(FileDataType type, java.lang.String fileName, long length, java.lang.String path) -
GenericFileData
public GenericFileData(FileDataType type, java.lang.String fileName, long length, java.lang.String path, boolean encrypted, java.lang.String encryptionKey)
-
-
Method Details
-
getType
-
getFileName
public java.lang.String getFileName()- Specified by:
getFileNamein interfaceFileData
-
getLength
public long getLength() -
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Specified by:
getInputStreamin interfaceFileData- Throws:
java.io.IOException
-
getDescriptor
public java.lang.String getDescriptor()- Specified by:
getDescriptorin interfaceFileData
-
isEncrypted
public boolean isEncrypted()- Specified by:
isEncryptedin interfaceFileData
-
getEncryptionKey
public java.lang.String getEncryptionKey()- Specified by:
getEncryptionKeyin interfaceFileData
-
getBasePath
public java.lang.String getBasePath()- Specified by:
getBasePathin interfaceFileData
-
copyToTempFile
public java.io.File copyToTempFile() throws java.io.IOException- Specified by:
copyToTempFilein interfaceFileData- Throws:
java.io.IOException
-
copyToFile
public void copyToFile(java.io.File file) throws java.io.IOException- Specified by:
copyToFilein interfaceFileData- Throws:
java.io.IOException
-