jhplot.math.io
Class BinaryFile
- java.lang.Object
-
- jhplot.math.io.BinaryFile
-
public class BinaryFile extends java.lang.Object
BSD License
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
BIG_ENDIAN
static java.lang.String
LITTLE_ENDIAN
-
Constructor Summary
Constructors Constructor and Description BinaryFile(java.io.File f, java.lang.String endian)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static void
appendDoubleArray(java.io.File f, double[] array, java.lang.String endian)
static void
appendFloatArray(java.io.File f, float[] array, java.lang.String endian)
static void
appendIntArray(java.io.File f, int[] array, java.lang.String endian)
static void
main(java.lang.String[] args)
byte
readByte()
Read a binary Filebyte[]
readByteArray()
Read a binary Filedouble
readDouble()
Read a binary Filedouble[]
readDoubleArray()
Read a binary Filestatic double[]
readDoubleArray(java.io.File f, java.lang.String endian)
float
readFloat()
Read a binary Filefloat[]
readFloatArray()
Read a binary Filestatic float[]
readFloatArray(java.io.File f, java.lang.String endian)
int
readInt()
Read a binary Fileint[]
readIntArray()
Read a binary Filestatic int[]
readIntArray(java.io.File f, java.lang.String endian)
void
writeByte(byte b, boolean append)
Write a text in a binary Filevoid
writeByteArray(byte[] bytes, boolean append)
Write a text in a binary Filevoid
writeDouble(double d, boolean append)
Write a double in a binary Filevoid
writeDoubleArray(double[] array, boolean append)
Write a double array in a binary Filestatic void
writeDoubleArray(java.io.File f, double[] array, java.lang.String endian)
void
writeFloat(float f, boolean append)
Write a float in a binary Filestatic void
writeFloatArray(java.io.File f, float[] array, java.lang.String endian)
void
writeFloatArray(float[] array, boolean append)
Write a float array in a binary Filevoid
writeInt(int i, boolean append)
Write an int in a binary Filestatic void
writeIntArray(java.io.File f, int[] array, java.lang.String endian)
void
writeIntArray(int[] array, boolean append)
Write an int array in a binary File
-
-
-
Field Detail
-
LITTLE_ENDIAN
public static java.lang.String LITTLE_ENDIAN
-
BIG_ENDIAN
public static java.lang.String BIG_ENDIAN
-
-
Method Detail
-
readDoubleArray
public static double[] readDoubleArray(java.io.File f, java.lang.String endian)
-
readFloatArray
public static float[] readFloatArray(java.io.File f, java.lang.String endian)
-
readIntArray
public static int[] readIntArray(java.io.File f, java.lang.String endian)
-
writeDoubleArray
public static void writeDoubleArray(java.io.File f, double[] array, java.lang.String endian)
-
appendDoubleArray
public static void appendDoubleArray(java.io.File f, double[] array, java.lang.String endian)
-
writeFloatArray
public static void writeFloatArray(java.io.File f, float[] array, java.lang.String endian)
-
appendFloatArray
public static void appendFloatArray(java.io.File f, float[] array, java.lang.String endian)
-
writeIntArray
public static void writeIntArray(java.io.File f, int[] array, java.lang.String endian)
-
appendIntArray
public static void appendIntArray(java.io.File f, int[] array, java.lang.String endian)
-
readIntArray
public int[] readIntArray()
Read a binary File- Returns:
- int[]
-
readFloatArray
public float[] readFloatArray()
Read a binary File- Returns:
- float[]
-
readDoubleArray
public double[] readDoubleArray()
Read a binary File- Returns:
- double[]
-
readByteArray
public byte[] readByteArray()
Read a binary File- Returns:
- byte[]
-
writeIntArray
public void writeIntArray(int[] array, boolean append)
Write an int array in a binary File- Parameters:
array
- int[]append
- boolean
-
writeFloatArray
public void writeFloatArray(float[] array, boolean append)
Write a float array in a binary File- Parameters:
array
- float[]append
- boolean
-
writeDoubleArray
public void writeDoubleArray(double[] array, boolean append)
Write a double array in a binary File- Parameters:
array
- float[]append
- boolean
-
writeByteArray
public void writeByteArray(byte[] bytes, boolean append)
Write a text in a binary File- Parameters:
bytes
- byte[]append
- boolean
-
readInt
public int readInt()
Read a binary File- Returns:
- int
-
readFloat
public float readFloat()
Read a binary File- Returns:
- float
-
readDouble
public double readDouble()
Read a binary File- Returns:
- double
-
readByte
public byte readByte()
Read a binary File- Returns:
- byte
-
writeInt
public void writeInt(int i, boolean append)
Write an int in a binary File- Parameters:
i
- intappend
- boolean
-
writeFloat
public void writeFloat(float f, boolean append)
Write a float in a binary File- Parameters:
f
- floatappend
- boolean
-
writeDouble
public void writeDouble(double d, boolean append)
Write a double in a binary File- Parameters:
d
- doubleappend
- boolean
-
writeByte
public void writeByte(byte b, boolean append)
Write a text in a binary File- Parameters:
b
- byteappend
- boolean
-
main
public static void main(java.lang.String[] args)
-
-
DMelt 3.0 © DataMelt by jWork.ORG