Package com.kaltura.client
Class FileHolder
- java.lang.Object
-
- com.kaltura.client.FileHolder
-
- All Implemented Interfaces:
Serializable
public class FileHolder extends Object implements Serializable
This is an abstraction of a file which allows this construct to hold a File OR a Stream- Author:
- Aaron Zeckoski (azeckoski @ vt.edu)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileHolder(File file)Create a KF from a File objectFileHolder(FileInputStream fileInputStream, String mimeType, String name)Create a KF from a FileInputStream objectFileHolder(InputStream inputStream, String mimeType, String name, long size)Create a KF from a normal input stream and some params
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilegetFile()InputStreamgetInputStream()StringgetMimeType()StringgetName()longgetSize()
-
-
-
Constructor Detail
-
FileHolder
public FileHolder(File file)
Create a KF from a File object- Parameters:
file- the file (must not be null)
-
FileHolder
public FileHolder(FileInputStream fileInputStream, String mimeType, String name)
Create a KF from a FileInputStream object- Parameters:
fileInputStream- the file stream (must not be null)mimeType- mime typename- the file name
-
FileHolder
public FileHolder(InputStream inputStream, String mimeType, String name, long size)
Create a KF from a normal input stream and some params- Parameters:
inputStream- the file content stream (must not be null)mimeType- mime typename- the file namesize- the file size
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name for the file (is NEVER null)
-
getFile
public File getFile()
- Returns:
- the File object if one is set (this can be null)
-
getSize
public long getSize()
- Returns:
- the size of this file
-
getMimeType
public String getMimeType()
- Returns:
- the mime-type this file
-
getInputStream
public InputStream getInputStream()
- Returns:
- the input stream for this File (this is NEVER null)
-
-