java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.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 $
| 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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
NativeBinaryInputStream
public NativeBinaryInputStream(java.io.InputStream _in,
java.lang.String _machine)
throws java.io.IOException
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