public class BinaryFile extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BIG_ENDIAN |
static String |
LITTLE_ENDIAN |
Constructor and Description |
---|
BinaryFile(File f,
String endian) |
Modifier and Type | Method and Description |
---|---|
static void |
appendDoubleArray(File f,
double[] array,
String endian) |
static void |
appendFloatArray(File f,
float[] array,
String endian) |
static void |
appendIntArray(File f,
int[] array,
String endian) |
static void |
main(String[] args) |
byte |
readByte()
Read a binary File
|
byte[] |
readByteArray()
Read a binary File
|
double |
readDouble()
Read a binary File
|
double[] |
readDoubleArray()
Read a binary File
|
static double[] |
readDoubleArray(File f,
String endian) |
float |
readFloat()
Read a binary File
|
float[] |
readFloatArray()
Read a binary File
|
static float[] |
readFloatArray(File f,
String endian) |
int |
readInt()
Read a binary File
|
int[] |
readIntArray()
Read a binary File
|
static int[] |
readIntArray(File f,
String endian) |
void |
writeByte(byte b,
boolean append)
Write a text in a binary File
|
void |
writeByteArray(byte[] bytes,
boolean append)
Write a text in a binary File
|
void |
writeDouble(double d,
boolean append)
Write a double in a binary File
|
void |
writeDoubleArray(double[] array,
boolean append)
Write a double array in a binary File
|
static void |
writeDoubleArray(File f,
double[] array,
String endian) |
void |
writeFloat(float f,
boolean append)
Write a float in a binary File
|
static void |
writeFloatArray(File f,
float[] array,
String endian) |
void |
writeFloatArray(float[] array,
boolean append)
Write a float array in a binary File
|
void |
writeInt(int i,
boolean append)
Write an int in a binary File
|
static void |
writeIntArray(File f,
int[] array,
String endian) |
void |
writeIntArray(int[] array,
boolean append)
Write an int array in a binary File
|
public static String LITTLE_ENDIAN
public static String BIG_ENDIAN
public int[] readIntArray()
public float[] readFloatArray()
public double[] readDoubleArray()
public byte[] readByteArray()
public void writeIntArray(int[] array, boolean append)
array
- int[]append
- booleanpublic void writeFloatArray(float[] array, boolean append)
array
- float[]append
- booleanpublic void writeDoubleArray(double[] array, boolean append)
array
- float[]append
- booleanpublic void writeByteArray(byte[] bytes, boolean append)
bytes
- byte[]append
- booleanpublic int readInt()
public float readFloat()
public double readDouble()
public byte readByte()
public void writeInt(int i, boolean append)
i
- intappend
- booleanpublic void writeFloat(float f, boolean append)
f
- floatappend
- booleanpublic void writeDouble(double d, boolean append)
d
- doubleappend
- booleanpublic void writeByte(byte b, boolean append)
b
- byteappend
- booleanpublic static void main(String[] args)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics