FreeHEP API
Version v1.2.2

hep.graphics.heprep.ref
Class DefaultHepRepReader

java.lang.Object
  |
  +--hep.graphics.heprep.ref.DefaultHepRepReader
All Implemented Interfaces:
HepRepReader

public class DefaultHepRepReader
extends Object
implements HepRepReader

Read in java serialized IO

Version:
$Id: DefaultHepRepReader.java,v 1.1 2003/06/28 20:45:39 duns Exp $
Author:
M.Donszelmann

Field Summary
static String cvsId
           
 
Constructor Summary
DefaultHepRepReader(InputStream in)
           
DefaultHepRepReader(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).
 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

DefaultHepRepReader

public DefaultHepRepReader(InputStream in)
                    throws IOException

DefaultHepRepReader

public DefaultHepRepReader(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.

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.