com.sun.squawk.io.j2me.multicastoutput
Class Protocol
java.lang.Object
   com.sun.squawk.io.ConnectionBase
com.sun.squawk.io.ConnectionBase
       com.sun.squawk.io.j2me.multicastoutput.Protocol
com.sun.squawk.io.j2me.multicastoutput.Protocol
- All Implemented Interfaces: 
- Connection, OutputConnection
- public class Protocol 
- extends ConnectionBase- implements OutputConnection
GCF connection that multicasts to a number of configured output streams. The connection
 can be established without specifying any delegate streams and have the delegate streams
 added as a separate operation as shown below:
 
     MulticastOutputStream mos = (MulticastOutputStream)Connector.openOutputStream("multicastoutput:");
     OutputStream fos = Connector.openOutputStream("file://out.txt;append=true");
     OutputStream sos = Connector.openOutputStream("socket://host.domain.com:9999");
     DataOutputStream dos = new DataOutputStream(mos);
     mos.add(fos);
     mos.add(sos);
     dos.writeUTF("Hello World");
 
 Or the connection can be established and have one or more initial delegate streams opened as shown below:
 
     MulticastOutputStream mos = (MulticastOutputStream)Connector.openOutputStream("multicastoutput:file://out.txt\;append=true;socket://host.domain.com:9999");
     DataOutputStream dos = new DataOutputStream(mos);
     dos.writeUTF("Hello World");
 
 As indicated above, the URLs for any initial delegates are separated by ; and as such must have
 any embedded ;s escaped with a backslash.
 
 
 
 
 
 
Protocol
public Protocol()
open
public Connection open(String protocol,
                       String name,
                       int mode,
                       boolean timeouts)
                throws IOException
- Opens the connection.
 
- 
- Specified by:
- openin 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.
 
openOutputStream
public OutputStream openOutputStream()
                              throws IOException
- Opens and returns an output stream for this connection. The returned output stream
 will be a MulticastOutputStreaminstance.
 
- 
- Specified by:
- openOutputStreamin interface- OutputConnection
- Overrides:
- openOutputStreamin class- ConnectionBase
 
- 
- Returns:
- a MulticastOutputStreaminstance
- Throws:
- IOException- if an I/O error occurs
 
"For updated information see the Java FRC site"