A JTWI device has a working socket implementation. A MIDlet requests permission to use socket connections on this device using the attribute MIDlet-Permissions-Opt, but is denied permission.
Given:
20. public void connect() {
21. try {
22. String addr = "socket://host.com:79";
23. SocketConnection sc;
24. sc = (SocketConnection) Connector.open(addr);
25. sc.setSocketOption(SocketConnection.LINGER, 5);
26. InputStream is = sc.openInputStream();
27. OutputStream os = sc.openOutputStream();
28. os.write("\\r\\n".getBytes());
29. int ch = is.read();
30. // ...
35. } catch (IOException ioe) {
36. // ...
40. }
41. }
Which is true assuming that the argument to Connector.open() points to a valid destination, and the device has resources to create new socket connections?