Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


oracle.irm.engine.content.source
Class FileSourceFactory

java.lang.Object
  extended by oracle.irm.engine.content.source.FileSourceFactory


public final class FileSourceFactory
extends Object

File Source factory. This class provides methods for creating new instances of FileSource objects.


Method Summary
static FileSource createFileSource(File file)
          Create a file source from a file.
static FileSource createFileSource(String path)
          Create a file source from a path.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

createFileSource

public static FileSource createFileSource(File file)
                                   throws UnsupportedContentTypeException,
                                          IOException
Create a file source from a file. The size of the source is determined from the file length. The format of the file is inferred from the file extension.
Parameters:
file - the file. The file should contain unsealed data.
Returns:
a new File Source instance.
Throws:
UnsupportedContentTypeException - unsupported file type.
IOException - if there is an input/output error accessing the file.

createFileSource

public static FileSource createFileSource(String path)
                                   throws UnsupportedContentTypeException,
                                          IOException
Create a file source from a path. The size of the source is determined from the file length. The format of the file is inferred from the file extension.
Parameters:
path - the file path.
Returns:
a new File Source instance.
Throws:
UnsupportedContentTypeException - unsupported file type.
IOException - if there is an input/output error accessing the file.

Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


Copyright © 2011, Oracle. All rights reserved.