donaldp 2002/11/11 15:24:30
Added: info/src/java/org/apache/avalon/framework/tools/infobuilder
SerializedInfoWriter.java
Log:
Add in the start of a writer class for info objects
Revision Changes Path
1.1
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/infobuilder/SerializedInfoWriter.java
Index: SerializedInfoWriter.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.avalon.framework.tools.infobuilder;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.OutputStream;
import java.io.ObjectOutputStream;
import org.apache.avalon.framework.info.ComponentInfo;
import org.apache.avalon.framework.info.ServiceInfo;
/**
* Write {@link ComponentInfo} and {@link ServiceInfo} objects
* to a stream as serialized objects.
*
* @author <a href="mailto:peter at apache.org">Peter Donald</a>
* @version $Revision: 1.1 $ $Date: 2002/11/11 23:24:30 $
*/
public class SerializedInfoWriter
{
public void writeComponentInfo( final ComponentInfo info,
final OutputStream outputStream )
throws Exception
{
final ObjectOutputStream oos = new ObjectOutputStream( outputStream );
oos.writeObject( info );
oos.flush();
}
public void writeServiceInfo( final ServiceInfo info,
final OutputStream outputStream )
throws Exception
{
final ObjectOutputStream oos = new ObjectOutputStream( outputStream );
oos.writeObject( info );
oos.flush();
}
}
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>