Here you can find the source of saveResultToStream(ObjectOutputStream oos, Object result)
Parameter | Description |
---|---|
oos | stream to write |
result | result object |
Parameter | Description |
---|---|
IOException | - if an IO access error occurs |
public static void saveResultToStream(ObjectOutputStream oos, Object result) throws IOException
//package com.java2s; /******************************************************************************* * Copyright (c) 2005, 2010 Sybase, Inc. and others * 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 * * Contributors:// ww w . ja va 2s . c o m * Sybase, Inc. - initial API and implementation *******************************************************************************/ import java.io.IOException; import java.io.ObjectOutputStream; public class Main { /** * Saves result set to output stream * * @param oos stream to write * @param result result object * @throws IOException - if an IO access error occurs */ public static void saveResultToStream(ObjectOutputStream oos, Object result) throws IOException { if (oos != null) { oos.writeObject(result); oos.flush(); } } }