jhplot.math.io
Class BinaryInputStream
- java.lang.Object
-
- java.io.InputStream
-
- jhplot.math.io.BinaryInputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
public class BinaryInputStream extends java.io.InputStream
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 BinaryInputStream(java.io.InputStream in, boolean endian)
BinaryInputStream(java.io.InputStream in, java.lang.String endian)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
read()
Read a binary Filebyte
readByte()
Read a binary Filebyte[]
readByteArray()
Read a binary Filedouble
readDouble()
Read a binary Filedouble[]
readDoubleArray()
Read a binary Filestatic double[]
readDoubleArray(java.io.InputStream in, java.lang.String endian)
double[]
readDoubleArray(int n1, int n2)
Read a binary Filefloat
readFloat()
Read a binary Filefloat[]
readFloatArray()
Read a binary Filestatic float[]
readFloatArray(java.io.InputStream in, java.lang.String endian)
int
readInt()
Read a binary Fileint[]
readIntArray()
Read a binary Filestatic int[]
readIntArray(java.io.InputStream in, java.lang.String endian)
-
-
-
Field Detail
-
LITTLE_ENDIAN
public static java.lang.String LITTLE_ENDIAN
-
BIG_ENDIAN
public static java.lang.String BIG_ENDIAN
-
-
Constructor Detail
-
BinaryInputStream
public BinaryInputStream(java.io.InputStream in, java.lang.String endian)
-
BinaryInputStream
public BinaryInputStream(java.io.InputStream in, boolean endian)
-
-
Method Detail
-
readDoubleArray
public static double[] readDoubleArray(java.io.InputStream in, java.lang.String endian)
-
readFloatArray
public static float[] readFloatArray(java.io.InputStream in, java.lang.String endian)
-
readIntArray
public static int[] readIntArray(java.io.InputStream in, 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[]
-
readDoubleArray
public double[] readDoubleArray(int n1, int n2)
Read a binary File- Returns:
- double[]
-
readByteArray
public byte[] readByteArray()
Read a binary File- Returns:
- byte[]
-
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
-
read
public int read()
Read a binary File- Specified by:
read
in classjava.io.InputStream
- Returns:
- byte
-
-
DMelt 3.0 © DataMelt by jWork.ORG