Skip to content

Commit dbfe145

Browse files
committed
microedition: io: Stub some functions of Connector.java
Certain versions of Arcadius (which is now fixed since Tiled Layer works) call for Connector.open(String), and since those were commented out in FreeJ2ME, the result was a java.lang.NoSuchMethodError Now it just plays normally (free version gets stuck on the menu since "network" isn't implemented yet)
1 parent 7b662f0 commit dbfe145

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Diff for: src/javax/microedition/io/Connector.java

+6-10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class Connector
3030
public static final int READ_WRITE = 3;
3131
public static final int WRITE = 2;
3232

33+
private static OutputStream output = null;
3334

3435
public static InputStream openInputStream(String name)
3536
{
@@ -53,20 +54,15 @@ public static DataInputStream openDataInputStream(String name)
5354
return new DataInputStream(new fakeIS());
5455
}
5556

56-
/*
57-
58-
public static Connection open(String name) { }
59-
60-
public static Connection open(String name, int mode) { }
57+
public static Connection open(String name) { return null; }
6158

62-
public static Connection open(String name, int mode, boolean timeouts) { }
59+
public static Connection open(String name, int mode) { return null; }
6360

64-
public static DataOutputStream openDataOutputStream(String name) { return new DataOutputStream(new OutputStream()); }
61+
public static Connection open(String name, int mode, boolean timeouts) { return null; }
6562

66-
public static OutputStream openOutputStream(String name) { return new OutputStream(); }
67-
68-
*/
63+
public static DataOutputStream openDataOutputStream(String name) { return new DataOutputStream(output); }
6964

65+
public static OutputStream openOutputStream(String name) { return output; }
7066

7167
// fake inputstream
7268
private static class fakeIS extends InputStream

0 commit comments

Comments
 (0)