Here you can find the source of saveResultToStream(ObjectOutputStream oos, Object result)
public static void saveResultToStream(ObjectOutputStream oos, Object result) throws IOException
//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(); } } }