public static World[] getWorlds() throws IOException { DataInputStream in = new DataInputStream(new URL( "http://www.runescape.com/slr.ws?order=WMLPA").openStream()); in.skip(4); World[] worlds = new World[in.readShort()]; for (int i = 0; i < worlds.length; i++) { int j = in.readShort(); StringBuffer prefix = new StringBuffer(); byte b = -1; while ((b = in.readByte()) != 0) prefix.append((char) b); worlds[i] = new World(j & 0x7FFF, prefix.toString(), (j & 0x8000) != 0, in.readShort()); } return worlds; }