Oracle Java Wireless Client

com.oracle.mobile.io
Class ConnectorEx

java.lang.Object
  extended by com.oracle.mobile.io.ConnectorEx

public class ConnectorEx
extends java.lang.Object

Extended connector class allows to create connections with some additional parameters, for example it allows to specify access point for network connection.


Constructor Summary
ConnectorEx()
           
 
Method Summary
static javax.microedition.io.Connection open(java.lang.String name, ConnectionParameters params)
          Create and open a Connection.
static javax.microedition.io.Connection open(java.lang.String name, int mode, boolean timeouts, ConnectionParameters params)
          Create and open a Connection.
static javax.microedition.io.Connection open(java.lang.String name, int mode, ConnectionParameters params)
          Create and open a Connection.
static java.io.DataInputStream openDataInputStream(java.lang.String name, ConnectionParameters params)
          Create and open a connection input stream.
static java.io.DataOutputStream openDataOutputStream(java.lang.String name, ConnectionParameters params)
          Create and open a connection output stream.
static java.io.InputStream openInputStream(java.lang.String name, ConnectionParameters params)
          Create and open a connection input stream.
static java.io.OutputStream openOutputStream(java.lang.String name, ConnectionParameters params)
          Create and open a connection output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorEx

public ConnectorEx()
Method Detail

open

public static javax.microedition.io.Connection open(java.lang.String name,
                                                    ConnectionParameters params)
                                             throws java.io.IOException
Create and open a Connection.

Parameters:
name - The URL for the connection.
params - Additional parameters to pass to Connection
Returns:
A new Connection object.
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

open

public static javax.microedition.io.Connection open(java.lang.String name,
                                                    int mode,
                                                    ConnectionParameters params)
                                             throws java.io.IOException
Create and open a Connection.

Parameters:
name - The URL for the connection.
mode - The access mode.
params - Additional parameters to pass to Connection
Returns:
A new Connection object.
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

open

public static javax.microedition.io.Connection open(java.lang.String name,
                                                    int mode,
                                                    boolean timeouts,
                                                    ConnectionParameters params)
                                             throws java.io.IOException
Create and open a Connection.

Parameters:
name - The URL for the connection
mode - The access mode
timeouts - A flag to indicate that the caller wants timeout exceptions
params - Additional parameters to pass to Connection
Returns:
A new Connection object
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

openDataInputStream

public static java.io.DataInputStream openDataInputStream(java.lang.String name,
                                                          ConnectionParameters params)
                                                   throws java.io.IOException
Create and open a connection input stream.

Parameters:
name - The URL for the connection.
params - Additional parameters to pass to Connection
Returns:
A DataInputStream.
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

openDataOutputStream

public static java.io.DataOutputStream openDataOutputStream(java.lang.String name,
                                                            ConnectionParameters params)
                                                     throws java.io.IOException
Create and open a connection output stream.

Parameters:
name - The URL for the connection.
params - Additional parameters to pass to Connection
Returns:
A DataOutputStream.
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

openInputStream

public static java.io.InputStream openInputStream(java.lang.String name,
                                                  ConnectionParameters params)
                                           throws java.io.IOException
Create and open a connection input stream.

Parameters:
name - The URL for the connection.
params - Additional parameters to pass to Connection
Returns:
An InputStream.
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

openOutputStream

public static java.io.OutputStream openOutputStream(java.lang.String name,
                                                    ConnectionParameters params)
                                             throws java.io.IOException
Create and open a connection output stream.

Parameters:
name - The URL for the connection.
params - Additional parameters to pass to Connection
Returns:
An OutputStream.
Throws:
java.lang.IllegalArgumentException - If the specified protocol doesn't supports params parameters
java.lang.NullPointerException - if params is null
javax.microedition.io.ConnectionNotFoundException - If the target of the name cannot be found, or if the requested protocol type is not supported.
java.io.IOException - If some other kind of I/O error occurs.
java.lang.SecurityException - May be thrown if access to the protocol handler is prohibited.

Oracle Java Wireless Client

Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.