Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.fudaa.dodico.fortran
Class NativeBinaryInputStream  view NativeBinaryInputStream download NativeBinaryInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.io.DataInputStream
              extended byorg.fudaa.dodico.fortran.NativeBinaryInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput
Direct Known Subclasses:
FortranBinaryInputStream

public class NativeBinaryInputStream
extends java.io.DataInputStream

Une classe etendant DataInputStream et permettant de facilement lire des fichiers binaires dependants de la machine (sparc, i386, ...) Attention: cette classe est utilisée par FortranBinaryInputStream. A chaque appel de fonction le compteur de FortranBinaryInputStream est incrémenté. Pour l'instant ,il ne faut pas chainer les appels de methodes.
Ne pas faire:
public int readToto() { readToto2(); } il y aura eu 2 increments dans FortranBinaryInputStream ( pour readToto et pour readToto2)) ce qui fausse la lecture.

Version:
$Revision: 1.8 $ $Date: 2002/12/17 16:47:12 $ by $Author: deniger $

Field Summary
(package private)  byte[] buf
           
(package private)  int i1
           
(package private)  int i2
           
(package private)  int i3
           
(package private)  int i4
           
(package private)  int l1
           
(package private)  int l2
           
(package private)  int l3
           
(package private)  int l4
           
(package private)  int l5
           
(package private)  int l6
           
(package private)  int l7
           
(package private)  int l8
           
private  int nbByteLus_
          entier renvoye par la methode read.
(package private)  int s1
           
(package private)  int s2
           
static java.lang.String SPARC
           
static java.lang.String SPARC_NAME
           
static java.lang.String X86
           
static java.lang.String X86_NAME
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
NativeBinaryInputStream(java.io.InputStream _in, java.lang.String _machine)
           
 
Method Summary
static java.lang.String getMachineId(java.lang.String _desc)
          Renvoie a partir de l'identifiant de la machine _desc, l'identifiant correctement géré par cette classe.
 boolean isFinFichier()
          Indique si la fin du fichier est atteinte.
static boolean isMachineKnown(java.lang.String _machine)
          Renvoie true si _machine est geree par cette classe.
static boolean isSparc(java.lang.String _machine)
          Renvoie true, si _machine est un identifiant d'une machine sparc ( si finit par "sparc").
static boolean isX86(java.lang.String _machine)
          Renvoie true si _machine est du type X86 ( si la chaine finit par "X86").
 float readFloat_32()
           
 double readFloat_64()
           
 short readInt_16()
           
 int readInt_32()
           
 long readInt_64()
           
 byte readInt_8()
           
 int readUInt_16()
           
 long readUInt_32()
           
 short readUInt_8()
           
 void setMachineType(java.lang.String _machine)
           
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X86

public static final java.lang.String X86
See Also:
Constant Field Values

X86_NAME

public static final java.lang.String X86_NAME
See Also:
Constant Field Values

SPARC

public static final java.lang.String SPARC
See Also:
Constant Field Values

SPARC_NAME

public static final java.lang.String SPARC_NAME
See Also:
Constant Field Values

nbByteLus_

private int nbByteLus_
entier renvoye par la methode read.


l1

int l1

l2

int l2

l3

int l3

l4

int l4

l5

int l5

l6

int l6

l7

int l7

l8

int l8

i1

int i1

i2

int i2

i3

int i3

i4

int i4

s1

int s1

s2

int s2

buf

byte[] buf
Constructor Detail

NativeBinaryInputStream

public NativeBinaryInputStream(java.io.InputStream _in,
                               java.lang.String _machine)
                        throws java.io.IOException
Method Detail

getMachineId

public static java.lang.String getMachineId(java.lang.String _desc)
Renvoie a partir de l'identifiant de la machine _desc, l'identifiant correctement géré par cette classe. Si non trouvee, null est retourne.


isX86

public static boolean isX86(java.lang.String _machine)
Renvoie true si _machine est du type X86 ( si la chaine finit par "X86").


isSparc

public static boolean isSparc(java.lang.String _machine)
Renvoie true, si _machine est un identifiant d'une machine sparc ( si finit par "sparc").


isMachineKnown

public static boolean isMachineKnown(java.lang.String _machine)
Renvoie true si _machine est geree par cette classe.


setMachineType

public void setMachineType(java.lang.String _machine)

readInt_8

public byte readInt_8()
               throws java.io.IOException

readUInt_8

public short readUInt_8()
                 throws java.io.IOException

isFinFichier

public boolean isFinFichier()
Indique si la fin du fichier est atteinte. Si true ,cela signifie que la derniere lecture est erronnee.


readInt_16

public short readInt_16()
                 throws java.io.IOException

readUInt_16

public int readUInt_16()
                throws java.io.IOException

readInt_32

public int readInt_32()
               throws java.io.IOException

readUInt_32

public long readUInt_32()
                 throws java.io.IOException

readInt_64

public long readInt_64()
                throws java.io.IOException

readFloat_32

public float readFloat_32()
                   throws java.io.IOException

readFloat_64

public double readFloat_64()
                    throws java.io.IOException