We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
I was not able to get tha Java code to work until I spotted Endian conversion in similar project used here : http://svn.codingteam.net/baggle/baggle-solver/src/net/inouire/baggle/solver/Dawg.java
After slightly changing initialization (endianConversion ) - this worked for me:
public Dawg(String inputfile) throws IOException { try { DataInputStream dawgDataFile = new DataInputStream(new BufferedInputStream(new FileInputStream(inputfile))); int numberOfNodes = endianConversion(dawgDataFile.readInt()); units = new int[numberOfNodes]; for (int x = 0; x < numberOfNodes; x++) { units[x] = endianConversion(dawgDataFile.readInt()); } dawgDataFile.close(); } catch ( IOException iox ) { iox.printStackTrace(); } } private int endianConversion(int thisInteger) { return ((thisInteger & 0x000000ff) << 24) + ((thisInteger & 0x0000ff00) << 8) + ((thisInteger & 0x00ff0000) >>> 8) + ((thisInteger & 0xff000000) >>> 24); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi
I was not able to get tha Java code to work until I spotted Endian conversion in similar project used here : http://svn.codingteam.net/baggle/baggle-solver/src/net/inouire/baggle/solver/Dawg.java
After slightly changing initialization (endianConversion ) - this worked for me:
The text was updated successfully, but these errors were encountered: