public class ConnectorEx
extends java.lang.Object
Constructor and Description |
---|
ConnectorEx() |
Modifier and Type | Method and Description |
---|---|
static Connection |
open(java.lang.String name,
ConnectionParameters params)
Create and open a Connection.
|
static Connection |
open(java.lang.String name,
int mode,
boolean timeouts,
ConnectionParameters params)
Create and open a Connection.
|
static 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.
|
public static Connection open(java.lang.String name, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connection.params
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nulljavax.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.public static Connection open(java.lang.String name, int mode, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connection.mode
- The access mode.params
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nulljavax.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.public static Connection open(java.lang.String name, int mode, boolean timeouts, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connectionmode
- The access modetimeouts
- A flag to indicate that the caller
wants timeout exceptionsparams
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nulljavax.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.public static java.io.DataInputStream openDataInputStream(java.lang.String name, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connection.params
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nullConnectionNotFoundException
- 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.public static java.io.DataOutputStream openDataOutputStream(java.lang.String name, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connection.params
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nullConnectionNotFoundException
- 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.public static java.io.InputStream openInputStream(java.lang.String name, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connection.params
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nullConnectionNotFoundException
- 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.public static java.io.OutputStream openOutputStream(java.lang.String name, ConnectionParameters params) throws java.io.IOException
name
- The URL for the connection.params
- Additional parameters to pass to Connectionjava.lang.IllegalArgumentException
- If the specified protocol doesn't
supports params parametersjava.lang.NullPointerException
- if params is nullConnectionNotFoundException
- 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.Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.