FreeHEP API
Version current

hep.io.root.core
Interface RootInput

All Superinterfaces:
DataInput
All Known Implementing Classes:
FastInputStream, RootDaemonInputStream, RootRandomAccessFile

public interface RootInput
extends DataInput

Extension of DataInput with root specific utilities

Version:
$Id: RootInput.java,v 1.8 2005/08/10 00:56:30 tonyj Exp $
Author:
Tony Johnson (tonyj@slac.stanford.edu)
Source Code:
RootInput.java

Method Summary
 void checkLength(AbstractRootObject object)
           
 void clearMap()
           
 void close()
           
 void dump()
          For debugging
 RootClassFactory getFactory()
           
 long getPosition()
           
 int getRootVersion()
          Returns the Root version which wrote this file
 RootInput getTop()
          Returns the RootInput at the top of top of the heirarchy of slices
 int readArray(byte[] data)
           
 int readArray(double[] data)
           
 int readArray(float[] data)
           
 int readArray(int[] data)
           
 int readArray(short[] data)
           
 void readFixedArray(byte[] data)
           
 void readFixedArray(double[] data)
           
 void readFixedArray(float[] data)
           
 void readFixedArray(int[] data)
           
 void readFixedArray(long[] data)
           
 void readFixedArray(short[] data)
           
 void readMultiArray(Object[] array)
           
 String readNullTerminatedString(int maxLength)
           
 RootObject readObject(String type)
           
 RootObject readObjectRef()
           
 String readString()
           
 double readTwistedDouble()
          Reads a double in strange byte order?
 int readVersion()
           
 int readVersion(AbstractRootObject object)
           
 void setMap(int offset)
           
 void setPosition(long pos)
           
 void skipObject()
          For skipping uninterpretable objects
 RootInput slice(int size)
          Returns a new RootInput stream which represents a slice of this RootInput stream.
 RootInput slice(int inSize, int outSize)
          Slice and decompress
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 

Method Detail

getFactory

public RootClassFactory getFactory()
Returns:
The RootClassFactory associated with this stream

setMap

public void setMap(int offset)
            throws IOException
Throws:
IOException

setPosition

public void setPosition(long pos)
                 throws IOException
Throws:
IOException

getPosition

public long getPosition()
                 throws IOException
Throws:
IOException

getRootVersion

public int getRootVersion()
Returns the Root version which wrote this file


getTop

public RootInput getTop()
Returns the RootInput at the top of top of the heirarchy of slices


checkLength

public void checkLength(AbstractRootObject object)
                 throws IOException
Throws:
IOException

clearMap

public void clearMap()
              throws IOException
Throws:
IOException

readArray

public int readArray(int[] data)
              throws IOException
Throws:
IOException

readArray

public int readArray(byte[] data)
              throws IOException
Throws:
IOException

readArray

public int readArray(short[] data)
              throws IOException
Throws:
IOException

readArray

public int readArray(float[] data)
              throws IOException
Throws:
IOException

readArray

public int readArray(double[] data)
              throws IOException
Throws:
IOException

readFixedArray

public void readFixedArray(int[] data)
                    throws IOException
Throws:
IOException

readFixedArray

public void readFixedArray(byte[] data)
                    throws IOException
Throws:
IOException

readFixedArray

public void readFixedArray(short[] data)
                    throws IOException
Throws:
IOException

readFixedArray

public void readFixedArray(float[] data)
                    throws IOException
Throws:
IOException

readFixedArray

public void readFixedArray(double[] data)
                    throws IOException
Throws:
IOException

readFixedArray

public void readFixedArray(long[] data)
                    throws IOException
Throws:
IOException

readMultiArray

public void readMultiArray(Object[] array)
                    throws IOException
Throws:
IOException

readNullTerminatedString

public String readNullTerminatedString(int maxLength)
                                throws IOException
Throws:
IOException

readObject

public RootObject readObject(String type)
                      throws IOException
Throws:
IOException

readObjectRef

public RootObject readObjectRef()
                         throws IOException
Throws:
IOException

readString

public String readString()
                  throws IOException
Throws:
IOException

readVersion

public int readVersion()
                throws IOException
Throws:
IOException

readVersion

public int readVersion(AbstractRootObject object)
                throws IOException
Throws:
IOException

slice

public RootInput slice(int size)
                throws IOException
Returns a new RootInput stream which represents a slice of this RootInput stream. The new RootInput maintains its own file position independent of the parent stream. The slice starts from the current file position and extends for size bytes.

Parameters:
size - The size of the slice.
Returns:
The slice
Throws:
IOException

slice

public RootInput slice(int inSize,
                       int outSize)
                throws IOException
Slice and decompress

Throws:
IOException

readTwistedDouble

public double readTwistedDouble()
                         throws IOException
Reads a double in strange byte order?

Throws:
IOException

dump

public void dump()
          throws IOException
For debugging

Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

skipObject

public void skipObject()
                throws IOException
For skipping uninterpretable objects

Throws:
IOException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.