List of usage examples for com.fasterxml.jackson.datatype.hppc HppcModule HppcModule
public HppcModule()
From source file:org.dice_research.topicmodeling.lang.DictionaryDictCC.java
@Override public void saveAsObjectFile() { if (localDictionaryChanged) { FileOutputStream fout = null; try {/*from w w w .j a v a2 s . c o m*/ String filename = DICTIONARY_FILE_NAME; if (System.getProperty(SYSTEM_PROPERTY_NAME_FILE_APPENDIX) != null) { filename = filename.replace("$APPENDIX$", System.getProperty(SYSTEM_PROPERTY_NAME_FILE_APPENDIX)); } else { filename = filename.replace("$APPENDIX$", ""); } fout = new FileOutputStream(filename); ObjectMapper mapper = new ObjectMapper(); mapper.registerModule(new HppcModule()); mapper.writeValue(fout, dictionary); localDictionaryChanged = false; } catch (IOException e) { LOGGER.error("Error while writing the serialized dictionary to file.", e); } finally { try { fout.close(); } catch (Exception e) { } } } }