oracle.ord.im
Class OrdFileSource
java.lang.Object
|
+--oracle.ord.im.OrdFileSource
- All Implemented Interfaces:
- OrdContentSource
- public class OrdFileSource
- extends java.lang.Object
- implements OrdContentSource
An implementation class of OrdContentSource
to support using a file as the content source for deferred
loading.
Constructor Summary |
OrdFileSource(java.lang.String fileName)
Constructs an OrdFileSource instance. |
Type | Method |
int |
getContentLength()
Gets the length of the file. |
java.lang.String |
getFileName()
Gets the file name which refers to a file containing the content
to be loaded. |
java.io.InputStream |
getInputStream()
Gets an InputStream object pointing to the file. |
java.lang.String |
getMimeType()
Gets the MIME type of the content. |
void |
setFileName(java.lang.String fileName)
Sets a file name which refers to a file containing the
content to be loaded. |
void |
setMimeType(java.lang.String mimeType)
Sets the MIME type of the content. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrdFileSource
public OrdFileSource(java.lang.String fileName)
- Constructs an
OrdFileSource
instance.
- Parameters:
fileName
- a file name which refers to a file containing
the content to be loaded
setFileName
public void setFileName(java.lang.String fileName)
- Sets a file name which refers to a file containing the
content to be loaded.
- Parameters:
fileName
- a file name string
getFileName
public java.lang.String getFileName()
- Gets the file name which refers to a file containing the content
to be loaded.
- Returns:
- the file name string
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Gets an
InputStream
object pointing to the file.
- Specified by:
getInputStream
in interface OrdContentSource
- Returns:
- an
FileInputStream
object
getContentLength
public int getContentLength()
throws java.io.IOException
- Gets the length of the file.
- Specified by:
getContentLength
in interface OrdContentSource
- Returns:
- the length of the file
setMimeType
public void setMimeType(java.lang.String mimeType)
- Sets the
MIME
type of the content.
- Parameters:
mimeType
- the MIME
type of the content
getMimeType
public java.lang.String getMimeType()
- Gets the
MIME
type of the content. If the
MIME
type was not set by
a previous setMimeType(String)
call, it returns
null
.
- Specified by:
getMimeType
in interface OrdContentSource
- Returns:
- the
MIME
type