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 13617 2009-04-09 22:48:46Z tonyj $
Author:
Tony Johnson (tonyj@slac.stanford.edu)

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

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

setMap

void setMap(int offset)
            throws IOException
Throws:
IOException

setPosition

void setPosition(long pos)
                 throws IOException
Throws:
IOException

getPosition

long getPosition()
                 throws IOException
Throws:
IOException

getRootVersion

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


getTop

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


checkLength

void checkLength(AbstractRootObject object)
                 throws IOException
Throws:
IOException

clearMap

void clearMap()
              throws IOException
Throws:
IOException

readArray

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

readArray

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

readArray

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

readArray

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

readArray

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

readFixedArray

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

readFixedArray

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

readFixedArray

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

readFixedArray

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

readFixedArray

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

readFixedArray

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

readMultiArray

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

readNullTerminatedString

String readNullTerminatedString(int maxLength)
                                throws IOException
Throws:
IOException

readObject

RootObject readObject(String type)
                      throws IOException
Throws:
IOException

readObjectRef

RootObject readObjectRef()
                         throws IOException
Throws:
IOException

readString

String readString()
                  throws IOException
Throws:
IOException

readVersion

int readVersion()
                throws IOException
Throws:
IOException

readVersion

int readVersion(AbstractRootObject object)
                throws IOException
Throws:
IOException

slice

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

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

Throws:
IOException

readTwistedDouble

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

Throws:
IOException

dump

void dump()
          throws IOException
For debugging

Throws:
IOException

close

void close()
           throws IOException
Throws:
IOException

skipObject

void skipObject()
                throws IOException
For skipping uninterpretable objects

Throws:
IOException


Copyright © 2000-2013 FreeHEP. All Rights Reserved.