List of utility methods to do ObjectOutputStream Write
void | saveObject2FileImpl(final Serializable object, final File file) save Object File Impl ObjectOutputStream output = null; try { output = new ObjectOutputStream( new BufferedOutputStream(new DeflaterOutputStream(new FileOutputStream(file)), 1024 * 1024)); output.writeObject(object); output.flush(); output.close(); output = null; ... |
void | saveObjectInFile(String fileName, Object obj) save the serialized object into the specified file FileOutputStream fileOut = new FileOutputStream(fileName); ObjectOutputStream objectStream = new ObjectOutputStream(fileOut); objectStream.writeObject(obj); objectStream.close(); fileOut.close(); |
boolean | saveObjectToFile(File file, Object object) save Object To File ObjectOutputStream os = null; try { os = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file))); os.writeObject(object); return true; } catch (Exception e) { e.printStackTrace(); } finally { ... |
void | saveObjectToFile(File thatFile, Object... thisObject) save Object To File mylogger.log(Level.INFO, "Saving object{0} to file: {1}", new Object[] { thisObject.hashCode(), thatFile.getAbsolutePath() }); ObjectOutputStream stream; try { thatFile.delete(); if (thatFile.createNewFile()) { stream = new ObjectOutputStream(new FileOutputStream(thatFile)); stream.writeObject(thisObject); ... |
void | saveObjectToFile(final Object object, final String fileName) save Object To File try { FileOutputStream fileOutputStream = new FileOutputStream(fileName); ObjectOutputStream oos = new ObjectOutputStream(fileOutputStream); oos.writeObject(object); oos.flush(); oos.close(); } catch (IOException e) { throw new RuntimeException("Could not save '" + object + "' to file '" + fileName + "': " + e); ... |
void | saveObjectToFile(Object obj, String fileName) save Object To File try (ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(fileName))) { stream.writeObject(obj); } catch (IOException e) { throw new RuntimeException(e); |
void | saveObjectToPath(T objectToSave, String pathToSaveTo) Attempts to write an object to the provided path, creating the file if it does not already exist. try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(pathToSaveTo)); oos.writeObject(objectToSave); oos.close(); } catch (IOException e) { e.printStackTrace(); |
void | saveParameters() save Parameters try { FileOutputStream fos = new FileOutputStream(FILENAME_PARAMETERS); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(paramsMap); oos.close(); fos.close(); System.out.printf("Serialized HashMap data is saved in parameters.pfe"); } catch (IOException ioe) { ... |
void | saveResultToStream(ObjectOutputStream oos, Object result) save Result To Stream if (oos != null) {
oos.writeObject(result);
oos.flush();
|
void | saveResultToStream(ObjectOutputStream oos, Object result) Saves result set to output stream if (oos != null) {
oos.writeObject(result);
oos.flush();
|