FreeHEP API
Version current

hep.io.hbook
Class HbookFile

java.lang.Object
  extended byhep.io.hbook.HbookFile

public class HbookFile
extends Object

Class for reading an HBook/PAW file.

Version:
$Id: HbookFile.java,v 1.2 2005/09/14 16:37:18 tonyj Exp $
Author:
tonyj
Source Code:
HbookFile.java

Constructor Summary
HbookFile(File file)
          Open an hbook file.
HbookFile(String fileName)
          Open an hbook file.
HbookFile(String fileName, int recordSize)
          Open an hbook file.
 
Method Summary
 void close()
          Close the file.
 CompositeHbookObject getTopLevelDirectory()
          Returns the top level directory for this file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HbookFile

public HbookFile(File file)
          throws IOException
Open an hbook file.

Parameters:
file - The file to open
Throws:
IOException - If an IOError occurs while opening the file

HbookFile

public HbookFile(String fileName)
          throws IOException
Open an hbook file.

Parameters:
fileName - The name of the file to open
Throws:
IOException - If an IOError occurs while opening the file

HbookFile

public HbookFile(String fileName,
                 int recordSize)
          throws IOException
Open an hbook file.

Parameters:
fileName - The name of the file to open
recordSize - The record size (0 for default)
Throws:
IOException - If an IOError occurs while opening the file
Method Detail

close

public void close()
           throws IOException
Close the file. No more operations can be performed on the file or any of the objects obtained from the file after it is closed.

Throws:
IOException - If an IOError occurs while closing the file

getTopLevelDirectory

public CompositeHbookObject getTopLevelDirectory()
Returns the top level directory for this file. Use this to access objects inside the HBook file.

Returns:
The CompositeHbookObject representing the top level directory

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.