FreeHEP API
Version v1.2.2

hep.io.root.core
Class FastInputStream

java.lang.Object
  |
  +--hep.io.root.core.FastInputStream
All Implemented Interfaces:
DataInput, RootInput

public class FastInputStream
extends Object
implements RootInput

Version:
$Id: FastInputStream.java,v 1.3 2003/05/24 01:34:32 tonyj Exp $
Author:
tonyj

Constructor Summary
FastInputStream(RootFileReader rfr, RandomAccessFile raf)
           
 
Method Summary
 void checkLength(AbstractRootObject obj)
           
 void clearMap()
           
 void dump()
           
 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)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 void readFixedArray(byte[] data)
           
 void readFixedArray(double[] data)
           
 void readFixedArray(float[] data)
           
 void readFixedArray(int[] data)
           
 void readFixedArray(short[] data)
           
 float readFloat()
           
 void readFully(byte[] values)
           
 void readFully(byte[] values, int param, int param2)
           
 int readInt()
           
 String readLine()
           
 long readLong()
           
 void readMultiArray(Object[] array)
           
 String readNullTerminatedString(int maxLength)
           
 RootObject readObject(String type)
           
 RootObject readObjectRef()
           
 short readShort()
           
 String readString()
           
 double readTwistedDouble()
          Reads a double in strange byte order?
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 String readUTF()
           
 int readVersion()
           
 int readVersion(AbstractRootObject obj)
           
 void setMap(int offset)
           
 void setPosition(long pos)
           
 int skipBytes(int param)
           
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastInputStream

public FastInputStream(RootFileReader rfr,
                       RandomAccessFile raf)
                throws IOException
Method Detail

getFactory

public RootClassFactory getFactory()
Specified by:
getFactory in interface RootInput
Returns:
The RootClassFactory associated with this stream

setMap

public void setMap(int offset)
Specified by:
setMap in interface RootInput

setPosition

public void setPosition(long pos)
                 throws IOException
Specified by:
setPosition in interface RootInput
IOException

getPosition

public long getPosition()
                 throws IOException
Specified by:
getPosition in interface RootInput
IOException

getRootVersion

public int getRootVersion()
Description copied from interface: RootInput
Returns the Root version which wrote this file

Specified by:
getRootVersion in interface RootInput

getTop

public RootInput getTop()
Description copied from interface: RootInput
Returns the RootInput at the top of top of the heirarchy of slices

Specified by:
getTop in interface RootInput

checkLength

public void checkLength(AbstractRootObject obj)
                 throws IOException
Specified by:
checkLength in interface RootInput
IOException

clearMap

public void clearMap()
Specified by:
clearMap in interface RootInput

dump

public void dump()

readArray

public int readArray(short[] data)
              throws IOException
Specified by:
readArray in interface RootInput
IOException

readArray

public int readArray(byte[] data)
              throws IOException
Specified by:
readArray in interface RootInput
IOException

readArray

public int readArray(double[] data)
              throws IOException
Specified by:
readArray in interface RootInput
IOException

readArray

public int readArray(float[] data)
              throws IOException
Specified by:
readArray in interface RootInput
IOException

readArray

public int readArray(int[] data)
              throws IOException
Specified by:
readArray in interface RootInput
IOException

readBoolean

public boolean readBoolean()
                    throws IOException
Specified by:
readBoolean in interface DataInput
IOException

readByte

public byte readByte()
              throws IOException
Specified by:
readByte in interface DataInput
IOException

readChar

public char readChar()
              throws IOException
Specified by:
readChar in interface DataInput
IOException

readDouble

public double readDouble()
                  throws IOException
Specified by:
readDouble in interface DataInput
IOException

readTwistedDouble

public double readTwistedDouble()
                         throws IOException
Description copied from interface: RootInput
Reads a double in strange byte order?

Specified by:
readTwistedDouble in interface RootInput
IOException

readFixedArray

public void readFixedArray(byte[] data)
                    throws IOException
Specified by:
readFixedArray in interface RootInput
IOException

readFixedArray

public void readFixedArray(double[] data)
                    throws IOException
Specified by:
readFixedArray in interface RootInput
IOException

readFixedArray

public void readFixedArray(int[] data)
                    throws IOException
Specified by:
readFixedArray in interface RootInput
IOException

readFixedArray

public void readFixedArray(float[] data)
                    throws IOException
Specified by:
readFixedArray in interface RootInput
IOException

readFixedArray

public void readFixedArray(short[] data)
                    throws IOException
Specified by:
readFixedArray in interface RootInput
IOException

readFloat

public float readFloat()
                throws IOException
Specified by:
readFloat in interface DataInput
IOException

readFully

public void readFully(byte[] values)
               throws IOException
Specified by:
readFully in interface DataInput
IOException

readFully

public void readFully(byte[] values,
                      int param,
                      int param2)
               throws IOException
Specified by:
readFully in interface DataInput
IOException

readInt

public int readInt()
            throws IOException
Specified by:
readInt in interface DataInput
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface DataInput
IOException

readLong

public long readLong()
              throws IOException
Specified by:
readLong in interface DataInput
IOException

readMultiArray

public void readMultiArray(Object[] array)
                    throws IOException
Specified by:
readMultiArray in interface RootInput
IOException

readNullTerminatedString

public String readNullTerminatedString(int maxLength)
                                throws IOException
Specified by:
readNullTerminatedString in interface RootInput
IOException

readObject

public RootObject readObject(String type)
                      throws IOException
Specified by:
readObject in interface RootInput
IOException

readObjectRef

public RootObject readObjectRef()
                         throws IOException
Specified by:
readObjectRef in interface RootInput
IOException

readShort

public short readShort()
                throws IOException
Specified by:
readShort in interface DataInput
IOException

readString

public String readString()
                  throws IOException
Specified by:
readString in interface RootInput
IOException

readUTF

public String readUTF()
               throws IOException
Specified by:
readUTF in interface DataInput
IOException

readUnsignedByte

public int readUnsignedByte()
                     throws IOException
Specified by:
readUnsignedByte in interface DataInput
IOException

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Specified by:
readUnsignedShort in interface DataInput
IOException

readVersion

public int readVersion()
                throws IOException
Specified by:
readVersion in interface RootInput
IOException

readVersion

public int readVersion(AbstractRootObject obj)
                throws IOException
Specified by:
readVersion in interface RootInput
IOException

skipBytes

public int skipBytes(int param)
              throws IOException
Specified by:
skipBytes in interface DataInput
IOException

slice

public RootInput slice(int size)
                throws IOException
Description copied from interface: RootInput
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.

Specified by:
slice in interface RootInput
Parameters:
size - The size of the slice.
Returns:
The slice
IOException

slice

public RootInput slice(int inSize,
                       int outSize)
                throws IOException
Description copied from interface: RootInput
Slice and decompress

Specified by:
slice in interface RootInput
IOException

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.