Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.io.j2me.channel
Class Protocol

    java.lang.Object
      com.sun.squawk.io.ConnectionBase
          com.sun.squawk.io.j2me.channel.Protocol

All Implemented Interfaces:
  Connection, InputConnection, OutputConnection, StreamConnection, StreamConnectionNotifier

    public class Protocol

extends ConnectionBase
implements StreamConnection, StreamConnectionNotifier

This connection is used to 'channel' other connections through to an embedded J2SE VM (if any) that may support additional connection types not supported by the Squawk core code.

Constructor Summary
`Protocol()` Public constructor

Method Summary
`StreamConnection` | `acceptAndOpen()` acceptAndOpen
`void` | `close()` Close the connection.
`Connection` | `open(String protocol, String name, int mode, boolean timeouts)` open
`InputStream` | `openInputStream()` openInputStream
`OutputStream` | `openOutputStream()` openOutputStream

Methods inherited from class com.sun.squawk.io.ConnectionBase
`openDataInputStream, openDataOutputStream`

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

Methods inherited from interface javax.microedition.io.InputConnection
`openDataInputStream`

Methods inherited from interface javax.microedition.io.OutputConnection
`openDataOutputStream`

Constructor Detail

### Protocol

    public Protocol()

  Public constructor

Method Detail

### open

    public Connection open(String protocol,
                           String name,
                           int mode,
                           boolean timeouts)
                    throws IOException

  open

  Specified by:
    `open` in class `ConnectionBase`
  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:
    `ConnectionNotFoundException` - If the connection cannot be found.
    `IOException` - If some other kind of I/O error occurs.

### openInputStream

    public InputStream openInputStream()
                                throws IOException

  openInputStream

  Specified by:
    `openInputStream` in interface `InputConnection`
  Overrides:
    `openInputStream` in class `ConnectionBase`
  Returns:
    An input stream
  Throws:
    `IOException` - If an I/O error occurs

### openOutputStream

    public OutputStream openOutputStream()
                                  throws IOException

  openOutputStream

  Specified by:
    `openOutputStream` in interface `OutputConnection`
  Overrides:
    `openOutputStream` in class `ConnectionBase`
  Returns:
    An input stream
  Throws:
    `IOException` - If an I/O error occurs

### acceptAndOpen

    public StreamConnection acceptAndOpen()
                                   throws IOException

  acceptAndOpen

  Specified by:
    `acceptAndOpen` in interface `StreamConnectionNotifier`
  Returns:
    A `StreamConnection` to communicate with a client.
  Throws:
    `IOException` - If an I/O error occurs.

### close

    public void close()
               throws IOException

  Close the connection.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"