com.sun.squawk.io.j2me.serial
Class Protocol
java.lang.Object
com.sun.squawk.io.ConnectionBase
com.sun.squawk.io.j2me.serial.Protocol
- All Implemented Interfaces:
- Connection, InputConnection, OutputConnection, StreamConnection
public class Protocol
- extends ConnectionBase
- implements StreamConnection
serial.Protocol - provides read access to the serial/USB port for an eSPOT
Protocol
public Protocol()
open
public Connection open(String protocol,
String name,
int mode,
boolean timeouts)
throws IOException
- Description copied from class:
ConnectionBase
- Open a connection to a target.
- Specified by:
open in class ConnectionBase
- Parameters:
protocol - The URL protocolname - The URL for the connectionmode - The access modetimeouts - 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
- Description copied from class:
ConnectionBase
- Open and return a data input stream for a connection.
- 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
- Description copied from class:
ConnectionBase
- Open and return a data output stream for a connection.
- Specified by:
openOutputStream in interface OutputConnection- Overrides:
openOutputStream in class ConnectionBase
- Returns:
- An input stream
- Throws:
IOException - If an I/O error occurs
Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.