|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
ucar.unidata.io.BeLeDataInputStream
public class BeLeDataInputStream
Big-endian little-endian data input stream, from which numbers in both big- and little-endian representations can be read. This is needed for ESRI shapefiles, for example, since they contain both big- and little-endian representations.
Constructor Summary | |
---|---|
BeLeDataInputStream(java.io.InputStream inputStream)
Construct a bigEndian-littleEndian input stream from an input stream. |
|
BeLeDataInputStream(java.lang.String filename)
Construct a bigEndian-littleEndian input stream from a file. |
|
BeLeDataInputStream(java.net.URL url)
Construct a bigEndian-littleEndian input stream from a URL. |
Method Summary | |
---|---|
double |
readLEDouble()
read a double in little endian format |
void |
readLEDoubles(double[] d,
int n)
Reads n little-endian doubles from a random access file. |
float |
readLEFloat()
read an int in little endian format |
int |
readLEInt()
read an int in little endian format |
long |
readLELong()
read a long in little endian format |
void |
readLELongs(long[] lbuf,
int n)
Reads n little-endian longs from a random access file. |
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.io.FilterInputStream |
---|
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeLeDataInputStream(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- from which to read
java.io.IOException
- on read errorpublic BeLeDataInputStream(java.lang.String filename) throws java.io.IOException
filename
- of file
java.io.IOException
- on read errorpublic BeLeDataInputStream(java.net.URL url) throws java.io.IOException
url
- of remote data
java.io.IOException
- if there was a problem reading the file.Method Detail |
---|
public int readLEInt() throws java.io.IOException
java.io.IOException
- on read errorpublic float readLEFloat() throws java.io.IOException
java.io.IOException
- on read errorpublic double readLEDouble() throws java.io.IOException
java.io.IOException
- on read errorpublic final void readLEDoubles(double[] d, int n) throws java.io.IOException
n
little-endian doubles from a random access file.
This method is provided for speed when accessing a number of consecutive values of the same type.
d
- the buffer into which the doubles are readn
- number of little-endian doubles to read
java.io.IOException
- on read errorpublic long readLELong() throws java.io.IOException
java.io.IOException
- on read errorpublic final void readLELongs(long[] lbuf, int n) throws java.io.IOException
n
little-endian longs from a random access file.
This method is provided for speed when accessing a number of consecutive values of the same type.
lbuf
- the buffer into which the longs are readn
- the number of little-endian longs to read
java.io.IOException
- on read error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |