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
Currently the load method requires a file name. This could be minimally refactored to take an input stream as an option instead: e.g. public static ParserData Load(InputStream inStream) { ParserData pData = null; try { GZIPInputStream gzis = new GZIPInputStream(inStream); // Compressed ObjectInputStream in = new ObjectInputStream(gzis); // Load objects pData = (ParserData)in.readObject(); // Read the mix of grammars in.close(); // And close the stream. } catch (IOException e) { System.out.println("IOException\n"+e); return null; } catch (ClassNotFoundException e) { System.out.println("Class not found!"); return null; } return pData; } public static ParserData Load(String fileName) { FileInputStream fis = null; try { fis = new FileInputStream(fileName); // Load from file return Load(fis); } catch (IOException e) { System.out.println("IOException\n"+e); return null; } finally { try { if (fis != null) fis.close(); } catch (IOException e) { e.printStackTrace(); } } }
Original issue reported on code.google.com by DavidBut...@gmail.com on 24 Jul 2009 at 4:36
DavidBut...@gmail.com
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original issue reported on code.google.com by
DavidBut...@gmail.com
on 24 Jul 2009 at 4:36The text was updated successfully, but these errors were encountered: