Skip navigation links

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

E12907-02


oracle.irm.engine.content.source
Class URLSourceFactory

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


public final class URLSourceFactory
extends Object

URL Source factory. This class provides methods for creating new instances of URLSource objects.


Method Summary
static URLSource createURLSource(URL url)
          Create a URL source from a URI.
static URLSource createURLSource(URLConnection connection)
          Create a URL source from a URI connection.

 

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

 

Method Detail

createURLSource

public static URLSource createURLSource(URL url)
                                 throws IOException,
                                        UnsupportedContentTypeException,
                                        UnknownContentTypeException
Create a URL source from a URI. The content format is deduced from the content-type HTTP header. The data size is inferred from the content-length HTTP header. The URL connection that is created does not specify any time out values or allow any user interaction. If more control is required over the connection, the alternative constructor should be used.
Parameters:
url - the URL to the content. The URL should reference unsealed data.
Returns:
a new URL Source instance.
Throws:
IOException - if there is an input/output error opening a stream to the URL.
UnsupportedContentTypeException - unsupported content type specified by the content-type header.
UnknownContentTypeException - the content type could not be determined as there was no content-type header returned in the response.

createURLSource

public static URLSource createURLSource(URLConnection connection)
                                 throws IOException,
                                        UnsupportedContentTypeException,
                                        UnknownContentTypeException
Create a URL source from a URI connection. The content format is deduced from the content-type HTTP header. The data size is inferred from the content-length HTTP header.
Parameters:
connection - the URL connection to the content.
Returns:
a new URL Source instance.
Throws:
IOException - if there is an input/output error opening a stream to the URL.
UnsupportedContentTypeException - unsupported content type specified by the content-type header.
UnknownContentTypeException - the content type could not be determined as there was no content-type header returned in the response.

Skip navigation links

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

E12907-02


Copyright © 2010, Oracle. All rights reserved.