FreeHEP API
Version v1.2.2

hep.graphics.heprep.xml
Class XMLHepRepReader

java.lang.Object
  |
  +--hep.graphics.heprep.xml.XMLHepRepReader
All Implemented Interfaces:
HepRepReader

public class XMLHepRepReader
extends Object
implements HepRepReader

Version:
$Id: XMLHepRepReader.java,v 1.28 2003/12/09 22:59:56 duns Exp $
Author:
M.Donszelmann

Field Summary
static String cvsId
           
 
Constructor Summary
XMLHepRepReader(InputStream in)
           
XMLHepRepReader(String fileName)
           
 
Method Summary
 void close()
          Closes the reader and its underlying stream.
 boolean hasNext()
          Is there a next heprep.
 boolean hasRandomAccess()
          Allows random access.
 boolean hasSequentialAccess()
          Allows for sequential access.
 HepRep next()
          Reads the next HepRep from the Reader.
 HepRep read(String name)
          Reads a HepRep by name (random access only).
static void readDefaults()
           
static HepRep readHepRep(DefaultHepRep heprep, InputStream stream)
           
static HepRep readHepRep(InputStream stream)
           
 void reset()
          Resets a sequential HepRep reader.
 
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
Constructor Detail

XMLHepRepReader

public XMLHepRepReader(InputStream in)
                throws IOException

XMLHepRepReader

public XMLHepRepReader(String fileName)
                throws IOException
Method Detail

close

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

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

hasSequentialAccess

public boolean hasSequentialAccess()
                            throws IOException
Description copied from interface: HepRepReader
Allows for sequential access.

Specified by:
hasSequentialAccess in interface HepRepReader
Returns:
true if sequential access is possible.
Throws:
IOException - in case of a stream problem.

reset

public void reset()
           throws IOException,
                  UnsupportedOperationException
Description copied from interface: HepRepReader
Resets a sequential HepRep reader.

Specified by:
reset in interface HepRepReader
Throws:
UnsupportedOperationException - if the reader does not support sequential access.
IOException - in case of a stream problem.

hasNext

public boolean hasNext()
                throws IOException,
                       UnsupportedOperationException
Description copied from interface: HepRepReader
Is there a next heprep.

Specified by:
hasNext in interface HepRepReader
Returns:
true if the next heprep is available.
Throws:
IOException - in case of a stream problem.
UnsupportedOperationException - if the reader does not support sequential access.

next

public HepRep next()
            throws IOException,
                   UnsupportedOperationException,
                   NoSuchElementException
Description copied from interface: HepRepReader
Reads the next HepRep from the Reader.

Specified by:
next in interface HepRepReader
Returns:
heprep.
Throws:
IOException - in case of a stream problem.
NoSuchElementException - if the heprep is not available, or EOF.
UnsupportedOperationException - if the reader does not support sequential access.

hasRandomAccess

public boolean hasRandomAccess()
Description copied from interface: HepRepReader
Allows random access.

Specified by:
hasRandomAccess in interface HepRepReader
Returns:
true if this reader provides random access

read

public HepRep read(String name)
            throws IOException,
                   UnsupportedOperationException,
                   NoSuchElementException
Description copied from interface: HepRepReader
Reads a HepRep by name (random access only).

Specified by:
read in interface HepRepReader
Parameters:
name - for the heprep to be read.
Returns:
heprep.
Throws:
UnsupportedOperationException - if the reader does not support random access.
IOException - in case of a stream problem.
NoSuchElementException - if the heprep is not available.

readDefaults

public static void readDefaults()
                         throws IOException
IOException

readHepRep

public static HepRep readHepRep(InputStream stream)
                         throws IOException
IOException

readHepRep

public static HepRep readHepRep(DefaultHepRep heprep,
                                InputStream stream)
                         throws IOException
IOException

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.