protected synchronized void create(boolean stream) throws IOException {
  this.stream=stream;
  if (!stream) {
    ResourceManager.beforeUdpCreate();
    fd=new FileDescriptor();
    try {
      socketCreate(false);
    }
 catch (    IOException ioe) {
      ResourceManager.afterUdpClose();
      fd=null;
      throw ioe;
    }
  }
 else {
    fd=new FileDescriptor();
    socketCreate(true);
  }
  if (socket != null)   socket.setCreated();
  if (serverSocket != null)   serverSocket.setCreated();
}

protected synchronized void create ( boolean stream ) throws IOException { this . stream = stream ; if ( ! stream ) { ResourceManager . beforeUdpCreate ( ) ; fd = new FileDescriptor ( ) ; try { socketCreate ( false ) ; } catch ( IOException ioe ) { ResourceManager . afterUdpClose ( ) ; fd = null ; throw ioe ; } } else { fd = new FileDescriptor ( ) ; socketCreate ( true ) ; } if ( socket != null ) socket . setCreated ( ) ; if ( serverSocket != null ) serverSocket . setCreated ( ) ; }
creates a socket with a boolean that specifies whether this is a stream socket ( true ) or an unconnected udp socket ( false ) .
