Package org.netxms.base
Class NXCPDataInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
org.netxms.base.NXCPDataInputStream
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
Custom input stream for parsing NXCP messages
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorDescriptionNXCPDataInputStream
(byte[] data) Create NXCP data input stream for reading from existing byte arrayCreate NXCP data input stream on top of existing input stream -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
Read unsigned 32-bit integer from input streamMethods 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, mark, markSupported, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
NXCPDataInputStream
Create NXCP data input stream on top of existing input stream- Parameters:
in
- Input stream
-
NXCPDataInputStream
public NXCPDataInputStream(byte[] data) Create NXCP data input stream for reading from existing byte array- Parameters:
data
- Byte array to read data from
-
-
Method Details
-
readUnsignedInt
Read unsigned 32-bit integer from input stream- Returns:
- unsigned 32-bit integer converted into signed 64 bit integer
- Throws:
IOException
- if I/O error occurs
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- See Also:
-