Package ucar.unidata.io
Class BeLeDataInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
ucar.unidata.io.BeLeDataInputStream
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable
Deprecated.
not part of public API.
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
ConstructorsConstructorDescriptionBeLeDataInputStream(InputStream inputStream) Deprecated.Construct a bigEndian-littleEndian input stream from an input stream.BeLeDataInputStream(String filename) Deprecated.Construct a bigEndian-littleEndian input stream from a file.BeLeDataInputStream(URL url) Deprecated.Construct a bigEndian-littleEndian input stream from a URL. -
Method Summary
Modifier and TypeMethodDescriptiondoubleDeprecated.read a double in little endian formatfinal voidreadLEDoubles(double[] d, int n) Deprecated.Readsnlittle-endian doubles from a random access file.intDeprecated.read an int in little endian formatlongDeprecated.read a long in little endian formatfinal voidreadLELongs(long[] lbuf, int n) Deprecated.Readsnlittle-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, skipBytesMethods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Constructor Details
-
BeLeDataInputStream
Deprecated.Construct a bigEndian-littleEndian input stream from an input stream.- Parameters:
inputStream- from which to read
-
BeLeDataInputStream
Deprecated.Construct a bigEndian-littleEndian input stream from a file.- Parameters:
filename- of file- Throws:
IOException
-
BeLeDataInputStream
Deprecated.Construct a bigEndian-littleEndian input stream from a URL.- Parameters:
url- of remote data- Throws:
IOException
-
-
Method Details
-
readLEInt
Deprecated.read an int in little endian format- Returns:
- int created from next 4 bytes in stream, in littleEndian order
- Throws:
IOException
-
readLEDouble
Deprecated.read a double in little endian format- Returns:
- double from next 8 bytes in stream, littleEndian order
- Throws:
IOException
-
readLEDoubles
Deprecated.Readsnlittle-endian doubles from a random access file.This method is provided for speed when accessing a number of consecutive values of the same type.
- Parameters:
d- the buffer into which the doubles are readn- number of little-endian doubles to read- Throws:
IOException
-
readLELong
Deprecated.read a long in little endian format- Returns:
- long from next 8 bytes in stream, littleEndian order
- Throws:
IOException
-
readLELongs
Deprecated.Readsnlittle-endian longs from a random access file.This method is provided for speed when accessing a number of consecutive values of the same type.
- Parameters:
lbuf- the buffer into which the longs are readn- the number of little-endian longs to read- Throws:
IOException
-