Package ca.spatial.table
Class LERandomAccessFile
java.lang.Object
ca.spatial.table.LERandomAccessFile
A class that reads and writes binary data in
little endian format.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLERandomAccessFile(File file)
LERandomAccessFile(File file, int bufferSize)
LERandomAccessFile(File file, int bufferSize, String mode)
LERandomAccessFile(String filename)
LERandomAccessFile(String filename, int bufferSize)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
finalize()
void
flush()
static double
getDouble(byte[] buffer, int offset, int length)
long
static int
getInteger(byte[] buffer, int offset, int length)
static double
getLEDouble(byte[] buffer, int offset, int length)
static int
getLEInteger(byte[] buffer, int offset, int length)
static long
getLELong(byte[] buffer, int offset, int length)
static long
getLong(byte[] buffer, int offset, int length)
long
length()
int
read()
int
read(byte[] bytes)
int
read(byte[] bytes, int offset, int len)
double
float
int
readInt()
double
float
int
long
short
long
readLong()
short
void
seek(long pos)
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
void
writeDouble(double v)
void
writeFloat(float v)
void
writeInt(int v)
void
writeLEDouble(double v)
void
writeLEFloat(float v)
void
writeLEInt(int v)
void
writeLELong(long v)
void
writeLEShort(int v)
void
writeLong(long v)
void
writeShort(int v)
-
Field Details
-
DEFAULT_BUFSIZE
public static final int DEFAULT_BUFSIZE- See Also:
- Constant Field Values
-
-
Constructor Details
-
LERandomAccessFile
- Throws:
IOException
-
LERandomAccessFile
- Throws:
IOException
-
LERandomAccessFile
- Throws:
IOException
-
LERandomAccessFile
- Throws:
IOException
-
LERandomAccessFile
- Throws:
IOException
-
-
Method Details
-
finalize
- Throws:
Throwable
-
length
public long length() -
close
- Throws:
IOException
-
seek
public void seek(long pos) -
getFilePointer
- Throws:
IOException
-
flush
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
readInt
- Throws:
IOException
-
readShort
- Throws:
IOException
-
readLong
- Throws:
IOException
-
readLEShort
- Throws:
IOException
-
readLEInt
- Throws:
IOException
-
readLELong
- Throws:
IOException
-
readFloat
- Throws:
IOException
-
readDouble
- Throws:
IOException
-
readLEFloat
- Throws:
IOException
-
readLEDouble
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
writeShort
- Throws:
IOException
-
writeLEShort
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeLEInt
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
writeLELong
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeLEFloat
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeLEDouble
- Throws:
IOException
-
getLEInteger
public static int getLEInteger(byte[] buffer, int offset, int length) -
getInteger
public static int getInteger(byte[] buffer, int offset, int length) -
getLELong
public static long getLELong(byte[] buffer, int offset, int length) -
getLong
public static long getLong(byte[] buffer, int offset, int length) -
getLEDouble
public static double getLEDouble(byte[] buffer, int offset, int length) -
getDouble
public static double getDouble(byte[] buffer, int offset, int length)
-