Java ObjectOutputStream Write saveResultToStream(ObjectOutputStream oos, Object result)

Here you can find the source of saveResultToStream(ObjectOutputStream oos, Object result)

Description

save Result To Stream

License

Open Source License

Declaration

public static void saveResultToStream(ObjectOutputStream oos, Object result) throws IOException 

Method Source Code

//package com.java2s;
/***********************************************************************************************************************
 * Copyright (c) 2009 Sybase, Inc. All rights reserved. This program and the accompanying materials are made available
 * under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * //  ww w  .ja va  2  s.  c o m
 * Contributors: Sybase, Inc. - initial API and implementation
 **********************************************************************************************************************/

import java.io.IOException;
import java.io.ObjectOutputStream;

public class Main {
    public static void saveResultToStream(ObjectOutputStream oos, Object result) throws IOException {
        if (oos != null) {
            oos.writeObject(result);
            oos.flush();
        }
    }
}

Related

  1. saveObjectToFile(File thatFile, Object... thisObject)
  2. saveObjectToFile(final Object object, final String fileName)
  3. saveObjectToFile(Object obj, String fileName)
  4. saveObjectToPath(T objectToSave, String pathToSaveTo)
  5. saveParameters()
  6. saveResultToStream(ObjectOutputStream oos, Object result)
  7. saveSerializableObject(Object obj, String path)
  8. saveSerialized(Serializable obj, File file)
  9. saveStringToFile(String filepath, String content)