"

2013 FRC Java API

"

com.sun.squawk.io.j2me.debug
Class Protocol

java.lang.Object
  extended by com.sun.squawk.io.ConnectionBase
      extended by com.sun.squawk.io.j2me.debug.Protocol
All Implemented Interfaces:
Connection, OutputConnection

public class Protocol
extends ConnectionBase
implements OutputConnection

Connection to the J2ME debug stream The two valid urls are: "debug:" or "debug:err", which send output to the VM-level standard out or standard error streams. Used to implement System.out and System.err streams.

Version:
1.0 2/4/2000

Field Summary
protected  boolean err
           
protected  boolean opened
           
 
Constructor Summary
Protocol()
           
 
Method Summary
 Connection open(String protocol, String name, int mode, boolean timeouts)
          Open the connection
 OutputStream openOutputStream()
          Returns an output stream for this socket.
 
Methods inherited from class com.sun.squawk.io.ConnectionBase
close, openDataInputStream, openDataOutputStream, openInputStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.microedition.io.OutputConnection
openDataOutputStream
 
Methods inherited from interface javax.microedition.io.Connection
close
 

Field Detail

opened

protected boolean opened

err

protected boolean err
Constructor Detail

Protocol

public Protocol()
Method Detail

open

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

Specified by:
open in class ConnectionBase
Parameters:
name - the target for the connection
timeouts - a flag to indicate that the called wants timeout exceptions
protocol - The URL protocol
mode - The access mode
Returns:
A new Connection object
Throws:
ConnectionNotFoundException - If the connection cannot be found.
IOException - If some other kind of I/O error occurs.

openOutputStream

public OutputStream openOutputStream()
                              throws IOException
Returns an output stream for this socket.

Specified by:
openOutputStream in interface OutputConnection
Overrides:
openOutputStream in class ConnectionBase
Returns:
an output stream for writing bytes to this socket.
Throws:
IOException - if an I/O error occurs when creating the output stream.

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"