Skip to content

Commit

Permalink
microedition: io: Stub some functions of Connector.java
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
AShiningRay committed Sep 20, 2024
1 parent 7b662f0 commit dbfe145
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/javax/microedition/io/Connector.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class Connector
public static final int READ_WRITE = 3;
public static final int WRITE = 2;

private static OutputStream output = null;

public static InputStream openInputStream(String name)
{
Expand All @@ -53,20 +54,15 @@ public static DataInputStream openDataInputStream(String name)
return new DataInputStream(new fakeIS());
}

/*
public static Connection open(String name) { }
public static Connection open(String name, int mode) { }
public static Connection open(String name) { return null; }

public static Connection open(String name, int mode, boolean timeouts) { }
public static Connection open(String name, int mode) { return null; }

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

public static OutputStream openOutputStream(String name) { return new OutputStream(); }
*/
public static DataOutputStream openDataOutputStream(String name) { return new DataOutputStream(output); }

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

// fake inputstream
private static class fakeIS extends InputStream
Expand Down

0 comments on commit dbfe145

Please sign in to comment.