"

2013 FRC Java API

"

com.sun.squawk.io
Class ConnectionBase

java.lang.Object
  extended by com.sun.squawk.io.ConnectionBase
All Implemented Interfaces:
Connection
Direct Known Subclasses:
ConnectionBaseAdapter, Protocol, Protocol, Protocol, Protocol, Protocol, Protocol, Protocol

public abstract class ConnectionBase
extends Object
implements Connection

Base class for Connection protocols.


Constructor Summary
ConnectionBase()
           
 
Method Summary
 void close()
          Close
abstract  Connection open(String protocol, String name, int mode, boolean timeouts)
          Open a connection to a target.
 DataInputStream openDataInputStream()
          Create and open a connection input stream.
 DataOutputStream openDataOutputStream()
          Create and open a connection output stream.
 InputStream openInputStream()
          Open and return a data input stream for a connection.
 OutputStream openOutputStream()
          Open and return a data output stream for a connection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionBase

public ConnectionBase()
Method Detail

open

public abstract Connection open(String protocol,
                                String name,
                                int mode,
                                boolean timeouts)
                         throws IOException,
                                ConnectionNotFoundException
Open a connection to a target.

Parameters:
protocol - The URL protocol
name - The URL for the connection
mode - The access mode
timeouts - A flag to indicate that the caller wants timeout exceptions
Returns:
A new Connection object
Throws:
IllegalArgumentException - If a parameter is invalid.
ConnectionNotFoundException - If the connection cannot be found.
IOException - If some other kind of I/O error occurs.

openInputStream

public InputStream openInputStream()
                            throws IOException
Open and return a data input stream for a connection.

Returns:
An input stream
Throws:
IOException - If an I/O error occurs

openOutputStream

public OutputStream openOutputStream()
                              throws IOException
Open and return a data output stream for a connection.

Returns:
An input stream
Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close

Specified by:
close in interface Connection
Throws:
IOException - If an I/O error occurs

openDataInputStream

public DataInputStream openDataInputStream()
                                    throws IOException,
                                           ConnectionNotFoundException
Create and open a connection input stream.

Returns:
A DataInputStream.
Throws:
IllegalArgumentException - If a parameter is invalid.
ConnectionNotFoundException - If the connection cannot be found.
IOException - If some other kind of I/O error occurs.

openDataOutputStream

public DataOutputStream openDataOutputStream()
                                      throws IOException,
                                             ConnectionNotFoundException
Create and open a connection output stream.

Returns:
A DataOutputStream.
Throws:
IllegalArgumentException - If a parameter is invalid.
ConnectionNotFoundException - If the connection cannot be found.
IOException - If some other kind of I/O error occurs.

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"