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 public class BeLeDataInputStream extends DataInputStream
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.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description BeLeDataInputStream(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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double
readLEDouble()
Deprecated.read a double in little endian formatvoid
readLEDoubles(double[] d, int n)
Deprecated.Readsn
little-endian doubles from a random access file.int
readLEInt()
Deprecated.read an int in little endian formatlong
readLELong()
Deprecated.read a long in little endian formatvoid
readLELongs(long[] lbuf, int n)
Deprecated.Readsn
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.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
BeLeDataInputStream
public BeLeDataInputStream(InputStream inputStream)
Deprecated.Construct a bigEndian-littleEndian input stream from an input stream.- Parameters:
inputStream
- from which to read
-
BeLeDataInputStream
public BeLeDataInputStream(String filename) throws IOException
Deprecated.Construct a bigEndian-littleEndian input stream from a file.- Parameters:
filename
- of file- Throws:
IOException
-
BeLeDataInputStream
public BeLeDataInputStream(URL url) throws IOException
Deprecated.Construct a bigEndian-littleEndian input stream from a URL.- Parameters:
url
- of remote data- Throws:
IOException
-
-
Method Detail
-
readLEInt
public int readLEInt() throws IOException
Deprecated.read an int in little endian format- Returns:
- int created from next 4 bytes in stream, in littleEndian order
- Throws:
IOException
-
readLEDouble
public double readLEDouble() throws IOException
Deprecated.read a double in little endian format- Returns:
- double from next 8 bytes in stream, littleEndian order
- Throws:
IOException
-
readLEDoubles
public final void readLEDoubles(double[] d, int n) throws IOException
Deprecated.Readsn
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.
- Parameters:
d
- the buffer into which the doubles are readn
- number of little-endian doubles to read- Throws:
IOException
-
readLELong
public long readLELong() throws IOException
Deprecated.read a long in little endian format- Returns:
- long from next 8 bytes in stream, littleEndian order
- Throws:
IOException
-
readLELongs
public final void readLELongs(long[] lbuf, int n) throws IOException
Deprecated.Readsn
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.
- Parameters:
lbuf
- the buffer into which the longs are readn
- the number of little-endian longs to read- Throws:
IOException
-
-