Package com.onfido
Class FileTransfer
- java.lang.Object
-
- com.onfido.FileTransfer
-
public class FileTransfer extends Object
-
-
Constructor Summary
Constructors Constructor Description FileTransfer(byte[] byteArray, String filename)Create a new file transfer from a byte arrayFileTransfer(File inputFile)Create a new file transfer from a FileFileTransfer(InputStream inputStream, String filename)Create a new file transfer from an InputStream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getByteArray()Return the array of bytes used for this file transfer.StringgetContentType()StringgetFilename()FilegetInputFile()Return the input stream used for this file transfer
-
-
-
Constructor Detail
-
FileTransfer
public FileTransfer(byte[] byteArray, String filename)Create a new file transfer from a byte array- Parameters:
byteArray- Byte array to include in file transferfilename- Filename to send together with the transfer- Throws:
ApiException
-
FileTransfer
public FileTransfer(File inputFile)
Create a new file transfer from a File- Parameters:
inputFile- File to include in transfer- Throws:
ApiException
-
FileTransfer
public FileTransfer(InputStream inputStream, String filename) throws ApiException
Create a new file transfer from an InputStream- Parameters:
inputStream- InputStream to read data fromfilename- Filename to send together with the transfer- Throws:
ApiException
-
-
Method Detail
-
getByteArray
public byte[] getByteArray()
Return the array of bytes used for this file transfer.- Returns:
- array of bytes
-
getInputFile
public File getInputFile()
Return the input stream used for this file transfer- Returns:
- the provided input file
-
getFilename
public String getFilename()
- Returns:
- the filename associated with this transfer
-
getContentType
public String getContentType()
- Returns:
- the content-type associated with this transfer
-
-