FreeHEP API
Version current

hep.graphics.heprep.ref
Class DefaultHepRepWriter

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepWriter
All Implemented Interfaces:
HepRepWriter

public class DefaultHepRepWriter
extends Object
implements HepRepWriter

Writew out java serialized IO

Version:
$Id: DefaultHepRepWriter.java,v 1.9 2004/05/27 22:08:43 duns Exp $
Author:
M.Donszelmann
Source Code:
DefaultHepRepWriter.java

Field Summary
static String cvsId
           
protected  ObjectOutputStream out
           
protected  Map properties
           
protected  ZipOutputStream zip
           
 
Constructor Summary
protected DefaultHepRepWriter(OutputStream out, boolean randomAccess, boolean compress)
           
 
Method Summary
 void addProperty(String key, String value)
          Adds a property, to be written to the HepRep file when closed.
 void close()
          Closes the writer and its underlying stream.
 void write(HepRepAction action)
          Writes a HepRepAction.
 void write(HepRepAttDef attDef)
          Writes a HepRepAttDef.
 void write(HepRepAttribute attribute)
          Writes a HepRepAttribute.
 void write(HepRepAttValue attValue)
          Writes a HepRepAttValue.
 void write(HepRepDefinition definition)
          Writes a HepRepDefinition.
 void write(HepRepInstance instance)
          Writes a HepRepInstance.
 void write(HepRepInstanceTree instanceTree)
          Writes a HepRepInstanceTree.
 void write(HepRepPoint point)
          Writes a HepRepPoint.
 void write(HepRep heprep, String name)
          Writes a HepRep.
 void write(HepRepTreeID treeID)
          Writes a HepRepTreeID.
 void write(HepRepType type)
          Writes a HepRepType.
 void write(HepRepTypeTree typeTree)
          Writes a HepRepTypeTree.
 void write(List layerOrder)
          Writes the layerOrder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values

out

protected ObjectOutputStream out

zip

protected ZipOutputStream zip

properties

protected Map properties
Constructor Detail

DefaultHepRepWriter

protected DefaultHepRepWriter(OutputStream out,
                              boolean randomAccess,
                              boolean compress)
                       throws IOException
Method Detail

addProperty

public void addProperty(String key,
                        String value)
                 throws IOException
Description copied from interface: HepRepWriter
Adds a property, to be written to the HepRep file when closed.

Specified by:
addProperty in interface HepRepWriter
Parameters:
key -
value -
Throws:
IOException - in case of a stream problem.

close

public void close()
           throws IOException
Description copied from interface: HepRepWriter
Closes the writer and its underlying stream.

Specified by:
close in interface HepRepWriter
Throws:
IOException - in case of a stream problem.

write

public void write(HepRep heprep,
                  String name)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRep.

Specified by:
write in interface HepRepWriter
Parameters:
heprep - to be written.
name - for the heprep to be written (for tagged access), may be ommited.
Throws:
IOException - in case of a stream problem.

write

public void write(List layerOrder)
           throws IOException
Description copied from interface: HepRepWriter
Writes the layerOrder.

Specified by:
write in interface HepRepWriter
Parameters:
layerOrder - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepTypeTree typeTree)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepTypeTree.

Specified by:
write in interface HepRepWriter
Parameters:
typeTree - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepType type)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepType.

Specified by:
write in interface HepRepWriter
Parameters:
type - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepTreeID treeID)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepTreeID.

Specified by:
write in interface HepRepWriter
Parameters:
treeID - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepAction action)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepAction.

Specified by:
write in interface HepRepWriter
Parameters:
action - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepInstanceTree instanceTree)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepInstanceTree.

Specified by:
write in interface HepRepWriter
Parameters:
instanceTree - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepInstance instance)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepInstance.

Specified by:
write in interface HepRepWriter
Parameters:
instance - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepPoint point)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepPoint.

Specified by:
write in interface HepRepWriter
Parameters:
point - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepAttribute attribute)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepAttribute.

Specified by:
write in interface HepRepWriter
Parameters:
attribute - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepDefinition definition)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepDefinition.

Specified by:
write in interface HepRepWriter
Parameters:
definition - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepAttValue attValue)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepAttValue.

Specified by:
write in interface HepRepWriter
Parameters:
attValue - to be written.
Throws:
IOException - in case of a stream problem.

write

public void write(HepRepAttDef attDef)
           throws IOException
Description copied from interface: HepRepWriter
Writes a HepRepAttDef.

Specified by:
write in interface HepRepWriter
Parameters:
attDef - to be written.
Throws:
IOException - in case of a stream problem.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.